09-20-2009, 12:49 PM
[eluser]Whit Nelson[/eluser]
Hello all,
I have a question about form validation: I have several checkboxes, and I want to make sure that at least one is checked. However, each checkbox seems to run through the form validator independently, and so checking that at least one is checked would seem to require a global variable of some sort, which doesn't feel terribly clean to me.
Is there a clean way to run this check on several form elements at once? Can I set a rule which is independent of the form elements themselves, and an error corresponding to it?
Thanks in advance,
Whit
Hello all,
I have a question about form validation: I have several checkboxes, and I want to make sure that at least one is checked. However, each checkbox seems to run through the form validator independently, and so checking that at least one is checked would seem to require a global variable of some sort, which doesn't feel terribly clean to me.
Is there a clean way to run this check on several form elements at once? Can I set a rule which is independent of the form elements themselves, and an error corresponding to it?
Thanks in advance,
Whit