On a web form, I have a set of checkboxes that form a logical group but do not have the same name. Using the jQuery validation plugin (http://docs.jquery.com/Plugins/Validation
), I need to add a custom validation method and rule to ensure that the user checks at least one checkbox.
I've read the documentation on jquery.com and understand the basics of adding a method and rule, but I haven't been able to work out the specifics for this particular scenario.
and this does *not* provide the detail I'm looking for. Points won't be given for a reference to this page or anything similar, or for an answer that says, "Write a custom rule." I already figured that part out :) I set the points higher because I'm looking for actual code for the custom method and rule.
Thanks in advance--
<input type="checkbox" name="length" value="length">
<input type="checkbox" name="density" value="density">
<input type="checkbox" name="packaging" value="packaging">
<input type="checkbox" name="loose" value="loose">