If I have
<input type="checkbox" name="firstGroupOne">
<input type="checkbox" name="secondGroupOne">
<input type="checkbox" name="thirdGroupOne">
How can I select all checkboxes which end with GroupOne in the parameter name and also validate if at least one of these is checked? (As for the validation, I could iterate over each one and check, but maybe there is a one-liner with jquery?)
Thx!
This code will result in 0 if none are selected, or any number between 1 and 3 if 1-3 of them are selected.
Working jsFiddle Example.