Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Next Major Release
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Filter_Input
-
Labels:None
Description
Zend_Filter_Input disregards custom error messages passed to it via the 'messages' meta-command. This has been working previously but has been broken since the 1.8 ver. release.
For example, the following validators array:
$validators = array(
'name' => array('NotEmpty','messages' => 'Please enter your name'),
'subject' => array('NotEmpty','messages' => 'Please enter a subject'),
'email' => array('EmailAddress','messages' => 'Please enter a valid Email address'),
'content' => array('NotEmpty','messages' => 'Please enter message contents')
);
Returns the following message stack:
array(5) {
["name"] => array(1) {
["isEmpty"] => string(48) "You must give a non-empty value for field 'name'"
}
["subject"] => array(1) {
["isEmpty"] => string(51) "You must give a non-empty value for field 'subject'"
}
["content"] => array(1) {
["isEmpty"] => string(51) "You must give a non-empty value for field 'content'"
}
["email"] => array(1) {
[0] => string(24) "You must give a non-empty value for field 'content''"
}
}
I confirmed this bug. I have same problem with default error messages. In v.1.7.8 all work's fine.