You can clone with
HTTPS or Subversion.
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?
a) Should the Explode Validator be able to handle NULL values and skip validation.
b) Should the Explode Validator be configurable to accept NULL, but how would the Select Element have to change for this?
c) Is this just a configuration problem that should be avoided (if yes, than how?)
@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.
Merge branch 'hotfix/3527'