ZF-2712: Add NotEmpty validator when element is required
Description
As discussed on #zftalk, we need to do the following with Zend_Form_Element:
- If an element is required and does not contain a NotEmpty validator, add one to the top of the validator stack with the breakChainOnFailure flag set to true
- Add a flag and accessors that allow disabling the above behaviour on request.
This will enforce the semantic meaning of the required flag.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-22T10:00:17.000+0000
Committed in r8288.