ZF-4282: Zend_Form contains more than Zend_Form_Element_File elements with validation always fails


The below form never finished it seems to the validation some how swapped! If the form contains single file element its working as expected. I tried to track it down without result.

class ProductForm extends Zend_Dojo_Form{

    public function __construct(){
                $image = new Zend_Form_Element_File('image');
        $image->addValidator(new Zend_Validate_File_Extension(array('gif', 'jpg', 'png')));

        $brochure = new Zend_Form_Element_File('brochure');
        $brochure->addValidator(new Zend_Validate_File_Extension(array('pdf', 'doc')));

               $submit = new Zend_Form_Element_Submit('submit');

        $this->setAttrib('enctype', 'multipart/form-data');



2 different file elements are for now not supported if you use different validators. This is a feature request we already know.

Multiple files should work with trunk release. Please test and report back.

Note: Subforms are not supported until now! This is a separat issue Note: Dojo is a complete different thing. When you're having problems with Dojo please assign a dojo issue and not a form issue.

If I get no response until 22.Sept. I will close this issue as solved.