Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.8.2
-
Component/s: Zend_Filter_Input
-
Labels:None
-
Fix Version Priority:Nice to Have
Description
I'm not sure if it's the correct behavior or not but if you set notEmptyMessage in the options array and you use a validation rule which handle empty message like Zend_Validate_Alpha the "generic" message notEmptyMessage will not be use in favor of which handle Zend_Validate_Alpha::STRING_EMPTY.
By setting notEmptyMessage in the options I was expecting to have the same message for all empty value.
$data = array('title'=>'');
$validators = array(
'title' => array('Alpha', 'presence' => 'required')
);
$options = array(
'missingMessage' => "Le champ '%field%' est manquant",
'notEmptyMessage' => "Le champ '%field%' est requis"
);
$input = new Zend_Filter_Input(null, $validators, $data, $options);
print_r($input->getMessages());
// Output
// Array ( [title] => Array ( [0] => '' is an empty string ) )
Issue Links
| This issue is dependecy of: | ||||
| ZF-7034 | Don't get NotEmpty Validator if it's still exists in FiterChain |
|
|
|
Changing to 'Unassigned'