I would expect all error messages to be 'Invalid Email Address',
instead my errors look like

[emailAddressInvalidHostname] => 'iasdf' is no valid hostname for email address 'ASDF@iasdf'
[hostnameInvalidHostname] => 'iasdf' does not match the expected structure for a DNS hostname
[hostnameLocalNameNotAllowed] => 'iasdf' appears to be a local network name but local network names are not allowed

I read through the code,
It looks like the setMessage method for Zend_Validate_EmailAddress is overloading the Zend_Validate_Abstract method
The abstract method has

foreach($keys as $key) {
$this->setMessage($messageString, $key);
}

Zend_Validate_EmailAddress does not

When I add the foreach to the email address validator it fixes the problem

Comments

I don't think this is a duplicate, from what i can tell, the ticked linked as the duplicate is what caused this problem, the change was made in the abstract, but not in the extended EmailAddress validator. I've already started to not use these messages, because as another person pointed out, they aren't for end user consumption, but it still should work as expected.

Posted by Thomas Weidner (thomas) on 2010-12-18T10:36:17.000+0000

Fixed with GH-83

Posted by Sylvain DIDELOT (neck) on 2012-02-12T14:25:12.000+0000

Despite marked as fixed this is still an issue in 1.11.11 .

Zend_Validate_EmailAddress::setMessage will only set the first message and ignore others if $key is null. This is inconsistent with abstract method.