Re: QuickForm rule
| From: | webmaster - detectomania | Date: | Wed, 15 Aug 2001 03:11:00 +0000 |
| Subject: | Re: QuickForm rule | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14114@lists.php.net to get a copy of this message | ||
Hello, the rule you made it´s a php function so only will work on server
side. To make a rule verification on client side, it must be a javascript
function.
Best regards
Ricardo.
----- Original Message -----
From: "Sawan Vithlani" <svithlani@swiftel.com.au>
To: <pear-general@lists.php.net>
Sent: Saturday, August 14, 2004 12:09 PM
Subject: [PEAR] QuickForm rule
> Hello All.
>
> Can anyone please give me some advice on the following:
>
> I want to create a simple rule for validating an element on a form (the
> rule is a php function). Is this the correct way to do it:
>
> function myFunction()
> {
> ....
> ....
> }
>
>
> $form->registerRule('myRule', function, 'myFunction');
> $form->addRule('nameBox', 'message', 'myRule');
>
> The real question is, is there any way I can get this to work on the
> client:
>
> $form->addRule('nameBox', 'message', 'myRule', '',
> 'client');
>
> Thanks
>
> sawan
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>