You would use something lile this:
$("#myForm").validate({
rules: {
username: {
email: {
required:true,
email:true,
maxlength:255,
},
confirmEmail: {
required:true,
equalTo: "#email"
},
}
}
})
try something like this:
"#phone1": {
number: true,
minlength:3,
required: function(element){
return ($('#pri_noPhone_wrapper input:checked').val() == 'True');
}
}
The HTML (after looking at this I forgot to add the wrapper HTML)
<span id='pri_noPhone_wrapper'>
Phone:
<input type="checkbox" name="pri_noPhone" value="what ever" />
</span>
I think you want your dependency specified using proper selector syntax:
required: {
depends: "#pri_noPhone:not(:checked)"
}
EDIT
Steve's answer on the email:
confirmEmail: {
required:true,
equalTo: "#email"
},