Re: QuickForm2 form rules
| From: | Alexey Borzov | Date: | Tue, 06 Dec 2011 08:26:13 +0000 |
| Subject: | Re: QuickForm2 form rules | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-31326@lists.php.net to get a copy of this message | ||
Hi Mark,
On 06.12.2011 2:31, Mark Steudel wrote:
In the old QuickForm there were form rules. Is there a way to achieve the same thing in QuickForm2? I want to be able to compare two values from different form elements.If you just wish to compare two form elements then you should probably use the built-in 'compare' Rule. There is an example for that in builtin-rules.php If you want to create something similar to old "form rule", you should subclass HTML_QuickForm2_Rule and implement validateOwner() and setOwnerError() methods in the child rule. There is no example for this currently, but it should be straightforward.