Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7 Preview Release
-
Fix Version/s: 1.7.0
-
Component/s: Zend_File_Transfer, Zend_Form
-
Labels:None
Description
When I have this form:
$form = new Zend_Form(); $form->setName('upload_form'); $form->setMethod(Zend_Form::METHOD_POST); $form->setEnctype('multipart/form-data'); $element = new Zend_Form_Element_File('upload_file'); $element->setLabel('upload_file:')->setRequired(true) ->setDestination('C:\Temp') ->addFilter(new Zend_Filter_File_Rename('XXX', 'XXX')) ; $form->addElement($element); $element2 = new Zend_Form_Element_File('upload_file2'); $element2->setLabel('upload_file2:') ->setDestination('C:\Temp') ->addFilter(new Zend_Filter_File_Rename('XXX', 'XXX')) ; $form->addElement($element2); $form->addElement(new Zend_Form_Element_Submit(array( 'name' => 'Upload', ))); $this->view->form = $form; if ($this->getRequest()->isPost()) { if (!$form->isValid($_POST)) { echo "Error"; } }
And I submit it without choosing files, it should show the error message "The file 'upload_file' was not uploaded", but it shows "The file 'upload_file2' was not uploaded" by the first element.

Issue Links
| This issue duplicates: | ||||
| ZF-4411 | Problems with Validating of multiple File Elements |
|
|
|
Duplication of
ZF-4411ZF-4411