PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #3126

client side validation for filenames

Details

Request #3126client side validation for filenames
Submitted2005-01-06 21:32 UTC
Fromrandy at rcs-comp dot com
StatusClosed
PackageHTML_QuickForm
PHP Version5.0.2
OSwindows xp
Roadmaps(Not assigned)

Comments

[2005-01-06 21:32 UTC] randy at rcs-comp dot com

Description:
------------
This is the same problem as Bug 134.

No offense, but "don't use client side JS for files" is not a big help.

I see no reason why JS could not be used to validate a file name using a regex. I have a form with over 20 fields all referencing file uploads. If I only use server-side validation all of the file paths disappear when the error is displayed on the next page load. That means my user then has to go through and browse all 20 files again for one mistake.

Its a simple regex match on the value of that field.

[2005-05-03 14:41 UTC] randy at rcs-comp dot com

I guess that is a good reason not to do it on the client side. Request closed.

[2005-05-03 14:41 UTC] randy at rcs-comp dot com

Closed.