Struggling with a validation scenario with jQuery Validate. I need at least 1 checkbox to be checked if a text field has a value. I have found how to require at least one checkbox in a group on their own, but not based on a value from a different field.
<input type="checkbox" name="a" value="x">
<input type="checkbox" name="b" value="y">
<input type="checkbox" name="c" value="z">
<input type="text" name="textfield">
At least one of the three checkboxes must be checked if there is any value at all in 'textfield'. If there is no value in 'textfield' the checkboxes can be checked or not - not required.
nameattribute. In that case, at least one of the three would be required.dependsattribute to toggle therequiredrule on the checkboxes.require_from_groupstand by