Issues

ZF-12128: File Upload validator should display file name instead of field name in error message

Issue Type: Bug Created: 2012-03-30T06:39:03.000+0000 Last Updated: 2012-06-15T13:51:17.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Alex Chistyakov (chistyakov) Assignee: Frank Brückner (frosch) Tags: - Zend_Validate_File

  • FixForZF1.12
  • zf-caretaker-adamlundrigan
  • zf-crteam-review

Related issues: Attachments: - Upload.php.patch

Description

In file Zend_Validate_File_Upload.php in the method isValid() should be used

<pre class="highlight">
instead of

to do not loose real file name information

For example look at the Zend_Validate_File_Size.php validator. In the lines ``` $file is a file content, not field name.

Comments

Posted by Frank Brückner (frosch) on 2012-03-30T10:43:09.000+0000

Patch and unit tests added.

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-07T22:25:18.000+0000

Reviewed patch and confirm that it works as expected with no obvious side-effects. I would like someone on the ZF/CR-Team to confirm that the upload validator should use the uploaded file name and not the field name in the exception message.

Posted by Rob Allen (rob) on 2012-06-13T20:34:58.000+0000

We use the value submitted for all other form validators don't we?

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-15T13:51:17.000+0000

Fixed in trunk r24959

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts