Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Zend\Validator\Explode does not handle NULL #2726
I have a Zend\Form\Input\Select which is configured with a Null Filter and the default Validators (which seem to have changed recently, adding by default the Explode Validator)
Now if I submit an empty value (empty array or missing value altogether) the filter correctly translates this to a NULL, which in turn is put into the explode validator, that now fails.
What should be the desired behaviour here?
referenced this issue
Jan 23, 2013
@pdobrigkeit my vote would be option A, but without skipping validation. I think the Explode validator should get out of the way (in terms of type checking) and just proxy to it's bound validators (See referenced PR #3527).
This would allow for Select and MultiCheckbox input filters to pass the filtered NULL values through the Explode validator to the InArray validator. The user would just need to ensure that NULL is a value in the InArray haystack.