zendframework/zf2 — pull request #1407 by assisp (2012-05-30 12:50:42+00:00)
Title: 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.