Hi,
I’m trying to set up a file upload form. Here’s to code of the form class:
$this->addElement('file', 'illustration', array(
'label' => 'Kép',
'destination' => APPLICATION_PATH . '/../data/uploads/illustrations',
'validators' => array(array('IsImage', null, array('messages' => array(
'fileIsImageFalseType' => 'A feltöltött állomány nem kép.',
'fileIsImageNotDetected' => 'A feltöltött állomány típusa nem
állapítható meg.',
'fileIsImageNotReadable' => 'A feltöltöt állomány nem olvasható.'
)))),
));
and standard checking in the controller:
if ($form->isValid($post)) {
// doing business
));
} else {
$form->populate($post);
}
However, if I post an invalid file, I only get an empty error message,
i. e. <ul class="errors"><li></li></ul>. It’s the same if I leave the
default messages, not specifying custom ones.
Any idea would by much appreciated.
Thanks,
Ádám