Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery validate conditional

$("#client-form").validate({
  focusInvalid: false,
  ignore: [],
  rules: {
    salaryband: {
      required: function(element) {
        return $('#job-earnings-salary').is(':checked')
      }
    }
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #validate #conditional
ADD COMMENT
Topic
Name
2+1 =