jquery if validation rule custom condition code example
Example: jquery validate conditional
$("#client-form").validate({
focusInvalid: false,
ignore: [],
rules: {
salaryband: {
required: function(element) {
return $('#job-earnings-salary').is(':checked')
}
}
}
});