I have an input filter whose authentication template for the email field is as follows:
'validators' => array( array ( 'name' => 'EmailAddress', 'options' => array( 'messages' => array( 'emailAddressInvalidFormat' => "Email address doesn't appear to be valid.", ) ), ), array ( 'name' => 'NotEmpty', 'options' => array( 'messages' => array( 'isEmpty' => 'Email address is required', ) ), ), ), ),
It works, this part is fine, but what I will laugh forever from the business units here is if I post an application that spits out this error message to users:
The input does not match the pattern
'/ ^ [A-Za-Z0-9 # $% &.!? + / = ^ _ `{|} ~ -] + @ [A-Za-Z0-9 -] + (?.: [A-Za-Z0-9 -] +) $ / '
There a strange bearded comedy buried there (yes, I understand that for sure, but, rofl).
I have two questions for good souls here:
How can I customize this error message? I cannot find the correct key, as easy for 'emailAddressInvalidFormat' .
Also, is it possible to flip all errors into one? What I mean? Instead of posting:
"Your email template has just left the building, and your email address cannot be blank and your email address is not displayed.
Is it possible to send a “single refusal” email?
"Hey bud, check your email, something is wrong!"
Thanks for your help, as always.
UPDATE
Vote for this error here https://github.com/zendframework/zend-validator/issues/41