Open Saeven opened 9 years ago
Are you using InputFilter? Then message could be defined at the same level of the input and should works too (Except the same message its used for every validator)
Also the behavior its supposed to be tested https://github.com/zendframework/zend-validator/blob/master/test/EmailAddressTest.php#L594
Please check again and provide a unit test showing the issue
Here's a quick repo that exhibits the behavior: https://github.com/Saeven/validator_test
Can see it from the command line. Email element types are being duplicitous it seems! ;)
This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at https://github.com/laminas/laminas-validator/issues/45.
Configuring a 'message' option on validators should return that single message on failure. (ref http://framework.zend.com/manual/current/en/modules/zend.validator.messages.html)
I have a simple field in a sign up form whose counterpart InputFilter contains this configuration:
In this case, unfortunately, we get a regex failure that's pretty cryptic on top of what we've set.
The message configured should preempt the regex failure.