I added a jQuery validation rule, so at least one checkbox of class "require-one" has to be checked in order for the form to validate.
$(".require-one").rules("add", {
required: true,
minlength: 1,
messages: {
required: "Check at least one"
}
});
It works great, the form does not submit and focus is set to the first checkbox.
But how do I get it to show the error message in:
<span id="require-one-errormessage></span>
Thanks in advance
divbut OP showsspan..validate()method and the relevant HTML?