Hi all,
With this piece of code I have an upload element:
$this->addElement('file', 'image', array(
'label' => 'Select your image',
'required' => true,
'validators' => array(
array('IsImage', true),
array('ImageSize', true, array(
'minwidth' => 100,
'minheight' => 100,
))
),
'destination' => '/tmp'
));
It needs to be an image of a certain size, but when I upload a pdf I get
both validators triggered. It says it's no image and the size of the image
could not be detected. The last error surprises me because both validators
should break the chain on failure (hence the true). What's happening, has
anyone an idea?
Thanks in advance,
Jurian