Zend validators and error messages: addValidator and addErrorMessage
问题 If I have a form element that has multiple validators attached to it (3 in this example), how would I use addErrorMessage to create custom error messages when each unique validator fails. Is there a way to add a custom message for each validator? $element = new Zend_Form_Element_Text()... $element->.... ->addValidator(...) ->addValidator(...) ->addValidator(...) ->addErrorMessage() 回答1: Typically it's done per validator error message, not per validator... $element->setErrorMessages(array(Zend