2012 Posts in 1438 Topics by 621 members
|Go to End|
9 May 2014 at 11:14am
I'm trying to check for two (or possibly more) conditions in an UploadField.
Basically, I want to allow some image types and make sure they're no bigger than 1Mb.
The problem is that all the examples I've seen only show ONE condition, ie the following does not work.
$LogoImageField = new UploadField('LogoImage');
$LogoImageField->getValidator()->allowedExtensions = array('jpg', 'gif', 'png', 'JPG', 'GIF', 'PNG');
How can I rewrite this to have more than one condition?
Thanks in advance.
|Go to Top|