fix/zf2-330 When submitting empty form elements, the data array entry associated with that element and used in the input filter validation (BaseInputFilter::isValid) will be set, but with an empty value (""). The way isValid() checks for these is wrong as it only checks if the array entry is set or not, making the check (!isset) always false, causing empty fields not be accepted even if they are not required. Also the validation for empty elements will not produce an error message in the case that these are required. The best way to handle these empty required fields is just to pass an empty string and let the validator handle it. It will set a "The Value is required and cannot be empty" error message in these cases.
fix/zf2-330 When submitting empty form elements, the data array entry associated with that element and used in the input filter validation (BaseInputFilter::isValid) will be set, but with an empty value (""). The way isValid() checks for these is wrong as it only checks if the array entry is set or not, making the check (!isset) always false, causing empty fields not be accepted even if they are not required. Also the validation for empty elements will not produce an error message in the case that these are required. The best way to handle these empty required fields is just to pass an empty string and let the validator handle it. It will set a "The Value is required and cannot be empty" error message in these cases.

Signed-off-by: Paulo Assis <0be0df9b2a247cd180731a4454c605fc22b6aa1d@gmail.com>

weierophinney/zend-inputfilter,zf2timo/zend-inputfilter,Maks3w/zend-inputfilter,akrabat/zend-inputfilter,akomm/zend-inputfilter,zendframework/zend-inputfilter,MadCat34/zend-inputfilter,stefanotorresi/zend-inputfilter,Blinden/zend-inputfilter