Issues

ZF-6711: Zend_Filter_Input skips ALLOW_EMPTY metacommand processing if rule refers several fields.

Issue Type: Docs: Improvement Created: 2009-05-18T07:34:55.000+0000 Last Updated: 2009-05-21T05:30:12.000+0000 Status: Resolved Fix version(s): - 1.8.2 (27/May/09)

Reporter: Alexander Veremyev (alexander) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Filter_Input

Related issues: - ZF-6725

Attachments:

Description

It uses:

<pre class="highlight">
if (count((array) $validatorRule[self::FIELDS]) > 1) {
    if (!$validatorRule[self::VALIDATOR_CHAIN]->isValid($data)) {
        $this->_invalidMessages[$validatorRule[self::RULE]] = $validatorRule[self::VALIDATOR_CHAIN]->getMessages();
        $this->_invalidErrors[$validatorRule[self::RULE]] = $validatorRule[self::VALIDATOR_CHAIN]->getErrors();
        return;
    }
} else {
...

construction.

<pre class="highlight">
if (count((array) $validatorRule[self::FIELDS]) == 1) {
...

actually should be used here.

But this code also skips ALLOW_EMPTY metacommand processing for this special case. So it should be removed at all.

Comments

Posted by Alexander Veremyev (alexander) on 2009-05-18T07:55:12.000+0000

Fixed.

Posted by Alexander Veremyev (alexander) on 2009-05-21T02:18:59.000+0000

Issue is reopened.

It's correct to process several fields as a special case. But it still needs ALLOW_EMPTY metacommand processing.

Posted by Alexander Veremyev (alexander) on 2009-05-21T05:30:12.000+0000

Fixed.

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