title: How to get all invalid elements using jQuery Validator?
body: <p><strong>What I'm trying to do:</strong></p>
  
  <p>I need to iterate through all HTML objects that have some invalid value inside. This is necessary, because I have tabbed page and I need to open some specific tab where the error occurred. In order to do this, I need to get parent of those objects.</p>
  
  <p><strong>This is how I wanted to solve it:</strong></p>
  
  <pre><code>$form.validate().settings.invalidHandler = function (form, validator) {
      var errors = validator.numberOfInvalids();
      if (errors) {
          validator.errorList[0].element.focus();
          for (var invObj in validator.errorList) {
              //do something for each invalid object
          }
      }
  };
  </code></pre>
  
  <p>Where $form is <code>&lt;form&gt;</code> object that have some inputs to validate inside.</p>
  
  <p>I thought that it will be called for each invalid object after I call <code>$form.validate()</code> or <code>$form.valid()</code>. In fact, it isn't called at all. Do you know some better ways to accomplish it?</p>