A small bump. It's really weird because what the manual mentions does not 
work. Any idea how to stop the chain from validating when one validator fails?

Regards, Jurian
-- 
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com

On Tuesday 10 Aug 2010 16:01:58 Jurian Sluiman wrote:
> 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

Reply via email to