Huy Guys,
I am trying to use jquery validate and specify that one field is required only when 3 other fields are blank.
the thing is that the rule is working but it still remain requiring the field even when I type value on it.
Thanks.
This is my code:
$("#ProspectDtlFrm").validate({
rules: {
prsptEmail: {
required: function(element) { return ( $("#prsptHomePhone").val() == '' && $("#prsptBusinessPhone").val() == '' && $("#prsptMobilePhone").val() =='') }
}
},
messages: {
prsptEmail: "Please enter your first name"
}
});