Try extending the validation class and override the $_messageTemplate
variable.
class My_Validate_NotEmpty extends Zend_Validate_NotEmpty
{
protected $_messageTemplates = array(
parent::IS_EMPTY = It can't be empty!,
);
}
Then add the class prefix and path to the form so the
Hi
Thank you for the suggestion. I had already thought about extending the
validation class. I just want to understand that behavior.
cheers
holo
2009/7/28 markbelanger1985 mbelan...@osz.com
Try extending the validation class and override the $_messageTemplate
variable.
class
Hi
I found my mistake. My fault. Don't need to extend the validation class.
Just need to change the order of the validatord.
Cheers
holo
2009/7/28 markbelanger1985 mbelan...@osz.com
Try extending the validation class and override the $_messageTemplate
variable.
class My_Validate_NotEmpty
Hi
I have a form with a text element and that I want to be validated as a date.
$date = new Zend_Form_Element_Text('Date');
$date-setLabel('Date')
-addValidator(
'Date',
true,
array(
'messages' = array(
'dateInvalidDate' = 'Opsss!