title: While trying to hide submit button until all input fields are valid it is hiding only for the first text filed validation?
body: <p>Working on form validation i'am trying to hide submit button until all text and password fields are not null and satisfies all input validation, but the problem is, it is enabling the submit button for the first text field validation only.</p>
  
  <p>So what's wrong with my code, please correct me.,</p>
  
  <p>Here's the code:    </p>
  
  <pre><code>$(document).ready(function() {
  
  var error_firstName = false;
  var error_lastName = false;
  var error_emailAdd = false;
  var error_pass = false;
  var error_confirmPass = false;
  var error_mobile = false;
  var error_confirmMob = false;   
  
  $("#error_form_firstName").hide();
  $("#error_form_lastName").hide();
  $("#error_form_emailAdd").hide();
  $("#error_form_password").hide();
  $("#error_span").hide();
  $("#error_form_confirmPassword").hide();
  $("#error_form_mobile").hide();
  $("error_form_confirmNumber").hide();
  
  $("#formSubmit").attr("disabled", "disabled");
  
  $("#form_firstName").focusout(function() {
      check_FirstName();
  });
  
  $("#form_lastName").focusout(function() {
      check_LastName();
  });
  
  $("#form_email").focusout(function() {
      check_email();
  });
  
  $("#form_pass").focusout(function() {
      check_password();
  });
  
  $("#form_cPass").focusout(function() {
      check_confirm_password();
  });
  
  $("#form_mob").focusout(function() {
      check_Mobile();
  });
  
  $("#form_cMob").focusout(function() {
      check_cMobile();
  });
  
  $('input, password').change(function(){
  if(error_firstName == false &amp;&amp; error_lastName == false &amp;&amp; error_emailAdd == false &amp;&amp; error_pass == false &amp;&amp; error_confirmPass == false &amp;&amp; error_mobile == false &amp;&amp; error_confirmMob == false){
          $("input[type=submit]").removeAttr("disabled");
              return true;
          }
          else{
              alert("Please fill the form correctly");
              return false;
          }
      });
  });
  </code></pre>
  
  <p>Corresponding HTML code for form validation:</p>
  
  <pre><code>&lt;form:form id="reg_form" action="submitRegistration.do" method="POST"
                  commandName="registrationForm"&gt;
                  &lt;div class="col-md-6 col-md-offset-3 register-top-grid"&gt;
                      &lt;h3&gt;Please fill the below information&lt;/h3&gt;
                      &lt;div&gt;
                          &lt;span&gt;First Name&lt;/span&gt;
                          &lt;form:input id="form_firstName" path="firstName" /&gt;
                          &lt;form:errors path="firstName" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_firstName" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Last Name&lt;/span&gt;
                          &lt;form:input id="form_lastName" path="lastName" /&gt;
                          &lt;form:errors path="lastName" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_lastName" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Email Address&lt;/span&gt;
                          &lt;form:input id="form_email" path="email" /&gt;
                          &lt;form:errors path="email" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_emailAdd" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Password&lt;/span&gt;
                          &lt;form:password id="form_pass" path="password" /&gt;
                          &lt;form:errors path="password" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_password" class="errorMessage"&gt;&lt;/p&gt;
  
                          &lt;!-- This is for extra line after password for alignment of error_text --&gt;
                          &lt;p id="error_span" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Confirm Password&lt;/span&gt;
                          &lt;form:password id="form_cPass" path="confirmPassword" /&gt;
                          &lt;form:errors path="confirmPassword" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_confirmPassword" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Mobile Number&lt;/span&gt;
                          &lt;form:input id="form_mob" path="mobile" /&gt;
                          &lt;form:errors path="mobile" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_mobile" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div&gt;
                          &lt;span&gt;Confirm Mobile Number&lt;/span&gt;
                          &lt;form:input id="form_cMob" path="confirmMobile" /&gt;
                          &lt;form:errors path="confirmMobile" cssStyle="color:red" element="div" /&gt;
                          &lt;p id="error_form_confirmNumber" class="errorMessage"&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div style="text-align: center"&gt;
                          &lt;input id="formSubmit" type="submit" value="submit" /&gt; &lt;button id="clear" type="button" value="clear" /&gt;
                      &lt;/div&gt;
                      &lt;a class="news-letter" href="#"&gt; &lt;label class="checkbox"&gt;
                      &lt;input type="checkbox" name="checkbox" checked=""&gt;&lt;i&gt; &lt;/i&gt;Sign Up for Newsletter&lt;/label&gt;
                      &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="clearfix"&gt;&lt;/div&gt;
              &lt;/form:form&gt;
  </code></pre>