JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/additional-methods.js"></script>
<form id="myform">
<input type="checkbox" value="1" name="items[test1]" id="items_test1">
<input type="checkbox" value="1" name="items[test2]" id="items_test2">
<input type="submit" />
</form>
CSS
input {
display: block;
}
JavaScript
// add a class to the checkboxes in the group, here I have added to all
$('[type=checkbox]').addClass('test_checkboxes');
// set up a rule for the class
$.validator.addClassRules("test_checkboxes", {
require_from_group: [1, ".test_checkboxes"]
});
$("form").validate({
groups: {
checkTest: 'items[test1] items[test2]'
}
});