Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.5.2
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Filter_Input
-
Labels:None
Description
Using the array of validators below, only one of the three regex error messages is ever returned from getMessages().
$aValidators = array(
'password_new' => array(
array('StringLength', 8),
new Zend_Validate_Regex('/[0-9]+/'),
new Zend_Validate_Regex('/[A-Z]+/'),
new Zend_Validate_Regex('/[a-z]+/'),
'presence' => 'required',
'allowEmpty' => false,
'messages' => array(
'Password must contain 8 or more characters',
'Password must contain at least one number',
'Password must contain at least one capital letter',
'Password must contain at least one lower case letter'
)
)
The 8 character limit check always works correctly.
If the password 'aa' is submitted the the 'at least one capital' message is returned. If the password 'AA' is submitted then the 'at least one lower case letter' message is returned. If 'Aa' is used the the 'at least one number' message is returned. In ZF1.04 the correct behaviour is seen - 'AA' and 'aa' return two errors each and 'Aa' returns just the 'at least one number' message.
Issue Links
| This issue is duplicated by: | ||||
| ZF-6764 | Minor misconception in Zend_Validate messages processing |
|
|
|
Fixed component assignment