Re: File elements, Client validation and QuickForm
| From: | Dan Rossi | Date: | Tue, 24 May 2005 23:03:58 +0000 |
| Subject: | Re: File elements, Client validation and QuickForm | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19361@lists.php.net to get a copy of this message | ||
Its just that by design QuickForm requires u post to itself to system validate, I split requests into methods such as get and post, once its postsed a different method is used to how its displayed so its trikky. I use HTTP_Upload for uploading files so i guess I can use that.
On 25/05/2005, at 3:27 AM, Matte Edens wrote:
I doubt it. The validation you'd want to do would be if it's a valid file, valid filetype, etc. You can't do the first one in JS, by design. You COULD prolly grab the text value of the input element and run some text comparison on it to see if the filename has a valid extension or if a value was entered at all, but I would think that's the extent of your client-side validation. matte - matte@arubanetworks.com webmonkey » arubanetworks.com Dan Rossi wrote:A really stupid question but can Quickform do clientside validation for file elements ? I gave it a try and doesnt look like it ;)-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php