When we add decorators to the form elements in zend, the validation message doesn’t shows why ?
Code Example :
$this->addElement('Text', 'Last_Name',array(
//'decorators' => $this->elementDecoratorsTr,
'label' => 'Last Name:',
'required' => false,
'filters' => array('StringTrim'),
'validators' => array(array('validator' => 'StringLength','validator' => 'Alpha'))
));
Here is
Zend_Form_Elementsource code:If you set your own decorators then the default ones are not loaded.
In order to see validation messages you need to have an
Errorsdecorator among the decorators you set.