How to remove Zend Form error mesessages (Value is required and can't be empty) ?
1
votes
3 Answers
0
votes
You can overwrite error messages in the form like in this example:
$this->addElement('text', Model_User_Object::USERNAME, array(
'filters' => array('StringTrim', 'StringToLower'),
'validators' => array(
array('notEmpty', true, array(
'messages' => array(
'isEmpty' => 'YOU CAN WRITE WHATEVER MESSAGE YOU WANT HERE.'
)
)
)
),
'required' => true,
'class' => 'input',
'label' => 'Your username:',
));
required
attribute. – Florent