ok, trying this out out with the latest trunk.

It doesn't appear to throwing an error on submitting the form, e.g. "Error:
Wrong Mime Type", though the file is not uploaded? $form->isValid() doesn't
catch it.



thomasW wrote:
> 
> I've already added it several days ago.
> You can try it out by using the trunk repository or you have to wait until 
> the next subrelease comes out.
> 
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
> 
> ----- Original Message ----- 
> From: "gerardroche" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, September 04, 2008 5:45 PM
> Subject: [fw-general] Zend_Form_Element_File & MimeType validator
> 
> 
>>
>> Is the MimeType validator available in Zend_Form_Element_File ZF1.6?
>>
>>
>> http://framework.zend.com/manual/en/zend.file.transfer.validators.html
>>
>>
>> $upload = new Zend_File_Transfer();
>>
>> // Limit the mimetype of all given files to gif images
>> $upload->addValidator('MimeType', 'image/gif');
>>
>> // Limit the mimetype of all given files to gif and jpeg images
>> $upload->setValidator('MimeType', array('image/gif', 'image/jpeg');
>>
>> // Limit the mimetype of all given files to the group images
>> $upload->setValidator('MimeType', 'image');
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Zend_Form_Element_File---MimeType-validator-tp19313492p19313492.html
>> Sent from the Zend Framework mailing list archive at Nabble.com. 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form_Element_File---MimeType-validator-tp19313492p19448410.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to