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