Re: QuickForm Validation Rule

From: Date: Fri, 22 Apr 2005 20:36:42 +0000
Subject: Re: QuickForm Validation Rule
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18925@lists.php.net to get a copy of this message
On 4/22/05, Ammar Ibrahim <ammar@gnuix.com> wrote: > How can I add a rule to an element indicating that it is required & must > be numeric? I tried the following with no luck, do I need to write a > custom rule? > > $form->addRule('points', 'Hint points must be a number', > 'numeric', > null,'client'); > Looks fine to me. Make sure you're doing that before you display / validate the form. Also, try it as a non-client rule. -- Justin Patrin

« previous php.pear.general (#18925) next »