QuickForm Compare Rule
| From: | fluidliqatyahoodotcom | Date: | Sat, 12 Mar 2005 18:42:55 +0000 |
| Subject: | QuickForm Compare Rule | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18001@lists.php.net to get a copy of this message | ||
How can I compare more than 2 input fields? I want to compare quite a number of select elements and
make sure they are all not the same.
The compare validation that comes with PEAR can only do comparison with 2 elements.
I need something which I will pass an array string to the first parameter of the addRule function
and let all the elements in the array to be validated.
I tried to create a custom rule function but it didn't work.
If I have an array of elements, what will the $element_name and the $element_value of the callback
function be like? I tried something like var_dump to check the variables but it didn't work.
Also, I tried putting just a line return false; in the callback function but when I try on the form,
no matter what, there was no error reported.
That is weird.
Thanks
---------------------------------
Do you Yahoo!?
Make Yahoo! your home page