ZF-9968: NotEmpty Validator treats objects as empty
I am referring to issue ZF-7631. There is claimed that Zend_Validate_NotEmpty does not accept anything other than string, boolean etc.
Although I basically agree with Thomas' post, that it does not make sense to check an object for emptiness, I wonder why it treats objects as empty by default rather than as "notEmpty". I came over that issue when trying to validate a Zend_Date object with the input filter. The property's presence is required, which makes Zend_Filter_Input add an NotEmpty-Validator to the chain. As all objects are always treated as empty, my date object does never get the chance to meet Zend_Validate_Date.
So please consider to change the default behaviour to "notEmpty" for objects instead of "empty". If null is passed instead of the object, it then should hit "empty", as expected. This issue impacts the filter chains of zend_filter_input.
Thanks for looking into the matter again.