Details
Description
There seems to be a mistake on the isValid method of the Zend_Form_Element class.
The validation is performed twice for array's elements.
Each items of the array are validated, then the array is validated too.
Suggested fix :
Prepend the "else" keyword on the line 1203 on revision 9215 :
else if ($validator->isValid($value, $context)) {
Then the problem will be solved with the classical test :
public function isValid($value, $context = null) { ... foreach ($this->getValidators() as $key => $validator) { ... if ($isArray && is_array($value)) ... else if ($validator->isValid($value, $context)) ... else ... ... } ... }
Greetings.
Please evaluate and categorize as necessary.