title: jQuery Validate plugin, enable submit button when form is valid
body: <p>I have an enabled and disabled state for the submit button on my form. </p>
  
  <p>The conditions are as follows: </p>
  
  <p>If all input fields have been entered and are <strong>valid</strong> enable the submit button.</p>
  
  <p>If <strong>some</strong> fields have not been entered do not enable the submit button. </p>
  
  <p>So far the validation is being done within the onkeyup event and is only working for the first input: </p>
  
  <pre><code>//Custom onkeyup validation
              onkeyup: function(element) {
                  //Check if input is empty remove valid class from parent
                  var formInput = $(element),
                      formInputParent = $(element).parent('fieldset');
                  if(formInputParent.hasClass('form--valid') &amp;&amp; formInput.val() === "") {
                      formInputParent.removeClass('form--valid');
                  }
  
                  //Check if all fields are not empty to remove submit--disabled class
                  var formInputs = $('form').find(':input');
                  console.log(formInputs);
  
                  formInputs.each(function(){
                      if(formInputs.length &gt; 0) {
                          formInputs.parents('form').find('.submit-form').removeClass('submit--disabled');
                      } 
                  });
  
              }
  </code></pre>
  
  <p>Check here for a <a href="http://jsfiddle.net/89y26/328/" rel="noreferrer"><strong>DEMO</strong></a></p>