Re: Quickform custom validation rule + validating file
| From: | Alexey Borzov | Date: | Thu, 28 Oct 2004 17:31:18 +0000 |
| Subject: | Re: Quickform custom validation rule + validating file | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15192@lists.php.net to get a copy of this message | ||
Hi,
Alexey Merkulove wrote:
If i have a custom rules in my form, how i supose to deal with files upload,
cause if i put something like this, it's not woking:
function ne_mod_validating($values)
{
if (empty($values['myfile']) && $values['mod']<0){ $errors['myfile'] =
'Error in file!';}
}
Well, I didn't remember that stuff myself, but looking at the code in QuickForm
foreach ($this->_formRules as $rule) {
if (true !== ($res = call_user_func($rule, $this->_submitValues, $this->_submitFiles))) {
I'd say that you need
function ne_mod_validating($values, $files)
{
...}