Issues

ZF-2521: Add ALLOW_EMPTY functionality to Zend_Form_Element

Issue Type: Improvement Created: 2008-01-29T15:34:39.000+0000 Last Updated: 2008-03-21T16:25:50.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:

Description

Currently, non-required (i.e., optional) elements will fail validation when an empty value is provided for validation. In many cases, empty values are acceptable, and should not be passed to validators.

By default, this flag will be set to true; an accessor or config option will be used to disable it.

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2008-01-30T15:32:57.000+0000

Resolved in r7709.

The new flag 'allowEmpty' (via the accessors setAllowEmpty() and getAllowEmpty()) now controls the behaviour of non-required elements. If the flag is true (the default value) and the element is not required, empty values do not get validated and the validations are assumed true.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts