Rule Validation for HierSelect element in HTML_QuickForm
| From: | Jonathan Smit | Date: | Mon, 19 Mar 2007 13:00:18 +0000 |
| Subject: | Rule Validation for HierSelect element in HTML_QuickForm | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-26875@lists.php.net to get a copy of this message | ||
Greetings,
How do you add validation to a HierSelect element in HTML_QuickForm such that you can validate each element of the HierSelect independantly?
I am using a hierselect element for users to select a Category and Sub-Category on my site for posting.
I just wish to set that both elements are required and have a dummy element 'Select' as the first element in both lists with a value of '' for this purpose.
I have tried various permutations of addRule and addGroupRule, but can't seem to get it to work correctly.
Any help, greatly appreciated!
Cheers
Jonathan