Re: HTML_QuickForm validating file uploads
| From: | Mark Wiesemann | Date: | Thu, 12 Oct 2006 19:29:11 +0000 |
| Subject: | Re: HTML_QuickForm validating file uploads | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25422@lists.php.net to get a copy of this message | ||
Hi Charles,
Charles Kline wrote:
> Can't seem to find my answer elsewhere so here goes:
Google would be a good place for your question. ;-)
> Is there a way to add clientside validation on the file type to a
> file form element? Or would that be restricted to checking the file
> name for an extension? If that is the case, does anyone have a sample
> rule that does that?
QuickForm has no support for such things. A quick Google search finds
for example this discussion in a web forum:
http://www.webdeveloper.com/forum/showthread.php?t=104406
The JS code posted there should do what you're searching for.
Regards,
Mark