It seems that using addErrorMessage() overrides all other validation errors.
For example, I created a custom phone element. And I also created a custom validation class that checks for a custom business rule. I expected it to print out the error messages from My_Validate_BusinessPhone when it did not meet the custom business rule. But it prints message set in addErrorMessage() all the time. Is this the normal behavior? Is there a way to chain the error messages?
$phone = new My_Form_Element_Phone( 'phone' );
$phone->setRequired( TRUE )
->setAttrib( 'id', 'phone' )
->addErrorMessage( 'Please provide a valid phone number' )
->addValidator( new My_Validate_BusinessPhone );
I thank you in advance.