Stupid question:
Do you really want to accept ONLY images which have exactly one pixel height and width ?

I would think that only one picture will be accepted by this settings... a placeholder 1x1 picture. :-)

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Matthew Lurz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 03, 2008 9:13 PM
Subject: [fw-general] ImageSize Validator



Other validators are working, but ImageSize is not for some reason. I've
attempted to add the validator to both the form and the transfer adapter
using trunk and 1.7. Is this known not to work yet or am I doing something
wrong? In a form, I've tried something akin to:

$image = new Zend_Form_Element_File('image');
$image->addValidator('Count', false, 1)
           ->addValidator('Extension', false, 'jpg')
           ->addValidator('Size', false, '1MB')
           ->addValidator('ImageSize', array(1,1,1,1));

In the action method I've tried:

$adapter = $form->image->getTransferAdapter();
$adapter->addValidator('ImageSize', array(1,1,1,1));
$adapter->addFilter(new Zend_Filter_File_Rename($newHeaderPath, false));

The filter and other validators work, just not the ImageSize validator. Any
ideas? Thank you.
--
View this message in context: http://www.nabble.com/ImageSize-Validator-tp20309905p20309905.html Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to