For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2005 > Re: [PEAR] File elements, Client validation and QuickForm









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] File elements, Client validation and QuickForm
Matte Edens

2005-05-26, 8:59 pm

I doubt it. The validation you'd want to do would be if it's a valid=20
file, valid filetype, etc. You can't do the first one in JS, by=20
design. You COULD prolly grab the text value of the input element and=20
run some text comparison on it to see if the filename has a valid=20
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 =BB 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 ;)
>
> =20
>

Dan Rossi

2005-05-26, 8:59 pm

Its just that by design QuickForm requires u post to itself to system=20
validate, I split requests into methods such as get and post, once its=20=

postsed a different method is used to how its displayed so its trikky.=20=

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=20=


> file, valid filetype, etc. You can't do the first one in JS, by=20
> design. You COULD prolly grab the text value of the input element and=20=


> run some text comparison on it to see if the filename has a valid=20
> extension or if a value was entered at all, but I would think that's=20=


> the extent of your client-side validation.
>
> matte - matte@arubanetworks.com
> webmonkey =BB arubanetworks.com
>
>
> Dan Rossi wrote:
>
[color=darkred]
>
> --=20
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com