Issues

ZF-6713: Zend_Filter_Input skips validators processing if ALLOW_EMPTY metacommand is set to true

Issue Type: Bug Created: 2009-05-18T08:11:21.000+0000 Last Updated: 2009-05-22T06:33:48.000+0000 Status: Resolved Fix version(s): Reporter: Alexander Veremyev (alexander) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Filter_Input

Related issues: Attachments:

Description

See _validateRule() method:

<pre class="highlight">
foreach ($data as $fieldKey => $field) {
    if (!is_array($field)) {
        $field = array($field);
    }
    foreach ($field as $value) {
        if (empty($value)) {
            if ($validatorRule[self::ALLOW_EMPTY] == true) {
                continue;
            }
...

Comments

Posted by Alexander Veremyev (alexander) on 2009-05-22T06:33:47.000+0000

That's correct since this code iterates through specified field values (this is not multiple-fields rule). ALLOW_EMPTY overrides other validators results.

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