Let say I have the following form. I need to put the error message of the checkbox a bit differently from the other element. The point is that I don't want the error message between the checkbox and the text.
Let say I have:
Name: [textbox] error here (required)
Email: [textbox] error here (required + email)
Interests: (at least 2 checked)
error here
[checkbox] Foo
[checkbox] Bar
[checkbox] Bla
[checkbox] Blu
Right now I have this code:
$().ready(function(){
$("#signupForm").validate({
rules: {
name: "required",
email: {
required: true,
email: true
},
"chkinterest[]": {
required: true,
minlength:2
}
},
messages: {
nom: "Enter your name.",
email: "Enter a valid email.",
"chkinterest[]": "Please select at least 2 elements."
}
});
});