Issues

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

Committed in r8288.