ZF-6711: Zend_Filter_Input skips ALLOW_EMPTY metacommand processing if rule refers several fields.
Description
It uses:
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.
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.