Re: QuickForm Error message
| From: | cwhisperer | Date: | Thu, 02 Mar 2006 09:53:40 +0000 |
| Subject: | Re: QuickForm Error message | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23196@lists.php.net to get a copy of this message | ||
strange,
I haven't a javascript function for all the other rules, so I do not understand why I need one for this specific function???
The function returns true or false and in the rule I specify the error msg....
thx for clarification
A.
Alexey Borzov wrote:
Hi, cwhisperer wrote:I registered a new rule as well as new function and added the rule as shown in the following snippet: $form->registerRule('chk_reseller_id','function','reseller_id'); $form->addRule('txtreseller','Invalid ResellerID!','chk_reseller_id',null,'client'); It works correct except for the error message which is not shown as javascript alert but in the form. What is wrong?You need a javascript function with the same name (reseller_id) in your form. QuickForm cannot write it for you.