change error_message in Zend_Validate_EmailAddress

Posted by Alexandr on Stack Overflow See other posts from Stack Overflow or by Alexandr
Published on 2010-06-04T10:42:36Z Indexed on 2010/06/05 20:42 UTC
Read the original article Hit count: 227

Filed under:
|
|
|

I need change all standart error message on my message in Zend_Element_Text when i use validator('EmailAddress') this validator trows several differnt message.

  • Value is required and can't be empty
  • '' is no valid email address in the basic format local-part@hostname

When i set options setErrorMessage('some my error text') it string shows on any error several times.

the error looks like

  • some my error text
  • some my error text

What the best way to solve this problem ?zf version 1.10.3

© Stack Overflow or respective owner

Related posts about php

Related posts about framework