Hi All
I have got used to using the custom error messages with form elements e.g.
$this->addElement('text', 'name', array('label' => 'Name',
'errormessages' =>
array('Please make an entry for name'),
'validators' =>
array(array('NotEmpty', true))));
But I can not get this to work with file elements, is it not an available
method for Zend_Form_Element_File? Have tried a few different ways
including:
$myimg = new Zend_Form_Element_File('myimg');
$myimg->setLabel('My Image');
$myimg->addValidator('Extension', false, 'jpg');
$myimg->setErrorMessages(array('Please make sure my image is a jpeg));
$this->addElement($myimg);
Whatever technique I use I get the default error message. Any pointers
appreciated.
Am using 1.7.0.
Thanks in advance
Tom
--
View this message in context:
http://www.nabble.com/Zend_Form_Element_File-and-custom-error-messages-tp21038938p21038938.html
Sent from the Zend Framework mailing list archive at Nabble.com.