title: Why jquery validation plugin not let the form submit in first click?
body: <p>I am developing portal for my client and here i am using jquery validation plugin in this project for the register form, its not let me the form submit in first click ? What issue here ? I attached jquery code here, please can help me...</p>
  
  <pre><code>$(document).ready(function(){
  $('#register-form').validate({
      errorElement: 'span', //default input error message container
      errorClass: 'help-block', // default input error message class
      focusInvalid: false, // do not focus the last invalid input
      onfocusout: false,
      /*onkeyup: false,
      onclick: false,*/
  
      rules: {
          profile_for: {
              selectbox: true
          },
          name: "required",
          day: {
              dob: true
          },
          month: {
              dob: true
          },
          year: {
              dob: true
          },
          gender: "required",
          sub_religion: {
              selectbox: true
          },
          mother_tongue: {
              selectbox: true
          },
          caste: {
              selectbox: true
          },
  
          email: {
              required: true,
              email: true,
              remote: {
                      url: vurl,
                      type: "post"
                   }
          },
          mobile: {
              required: true,
              number: true,
              mobi: true,
              remote: {
                      url: vurl,
                      type: "post"
                   }
          },
  
          password: {
              required: true,
              rangelength: [6, 10]
          }
  
      },
      messages: {
          profile_for:  "Profile created by should not be blank",
          name: "Please specify the name",
          day: "Please provide the day of your DOB",
          month: "Please provide a month of your DOB",
          year: "Please provide a year of your DOB",
          gender: "Please select the gender",
          sub_religion: "Please specify the denomination you belong to",
          mother_tongue: "Please specify your mother tongue",
          caste: "Please specify the caste you belong to",
          email: {
              required: "Provide valid email id.  Eg.. exlmatri@gmail.com",
              email: "Provide valid email id.  Eg.. exlmatri@gmail.com",
              remote: "Email already in use!"
              },
          mobile: {
              required: "Please specify a valid mobile number",   
              number: "Please specify a valid mobile number",
              mobi: "Please specify a valid mobile number - Only 10",
              remote: "Mobile No. already in use!"
          },
          password: {
              required: "Please specify password",
              rangelength: "Please specify password with 6 to 10 characters"
          }   
      },
  
      showErrors: function(errorMap, errorList) {
          $("#register-form").find("input,select").each(function() {
              $(this).removeClass("error");
              $(this).closest('.form-group').removeClass('has-error');
  
          });
          $("#myErrorContainer").hide();
          if(errorList.length) {
              $("#myErrorContainer").show();
              $("#myErrorContainer").html(errorList[0]['message']);
              $(errorList[0]['element']).addClass("error");
              $(errorList[0]['element']).closest('.form-group').addClass('has-error');
          }
      },  
  
      highlight: function (element) { // hightlight error inputs
          $(element).closest('.form-group').addClass('has-error'); // set error class to the control group
      },
  
      unhighlight: function (element) { // hightlight error inputs
          $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group
      },
  
      success: function (label) {
          label.closest('.form-group').removeClass('has-error');
          label.remove();
      },
  
      submitHandler: function (form) {
          form.submit(); // form validation success, call ajax form submit
      }
  
  
  
  }); 
  
  $.validator.addMethod('dob', function (value) {
      return (value != '0');
  }, "Please select date of birth");
  
  $.validator.addMethod('selectbox', function (value, message) {
      return (value != '0');
  }, "Required.");
  
  
  $.validator.addMethod('mobi', function (value) {
      if($("#mobile_code").val() == '99' &amp;&amp; value.length != 10)
          return false;
      else
          return true;
  }, "Required.");
  
  });
  </code></pre>