if (!
isset($validatorRule[self::VALIDATOR_CHAIN
])) { $validatorRule[self::VALIDATOR_CHAIN
] =
new Zend_Validate();
foreach ($validatorList as $key =>
$validator) { if (is_string($validator) ||
is_array($validator)) { $validator =
$this->
_getValidator($validator);
} if (isset($validatorRule[self::MESSAGES
][$key])) { $value =
$validatorRule[self::MESSAGES
][$key];
if (is_array($value)) { $validator->
setMessages($value);
} else { $validator->
setMessage($value);
} if ($validator instanceof Zend_Validate_NotEmpty
) { /** we are changing the defaults here, this is alright if all subsequent validators are also a not empty
* validator, but it goes wrong if one of them is not AND is required!!!
* that is why we restore the default value at the end of this loop
*/
if (is_array($value)) { $temp =
$value; // keep the original value