html_quickform addRule() question
| From: | Charles Kline | Date: | Tue, 18 Mar 2003 20:23:47 +0000 |
| Subject: | html_quickform addRule() question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-4292@lists.php.net to get a copy of this message | ||
Hi all,
I am trying to add a rule to the file field in my form. I want to allow only .jpg, or .pdf files to be uploaded. I am using this:
$form->addRule('myfile', 'Must be *.jpg', 'filename', '/^.*\.jpg$/');
but how would I change to make this rule allow .pdf as well?
Thanks.
Charles