title: Removing styles from jQuery.validator after successful validation
body: <p>I have the following code which adds custom css styles to my form when using the jQuery validation plugin.</p>
  
  <pre><code>$(document).ready(function() {
      jQuery.validator.setDefaults({
          errorPlacement: function(error, element) {
  
          // Adds the red outline
          element.parent().addClass("error");
  
          // Adds the red cross
          element.siblings(".error_status").addClass('check');
  
          // Removes the default error
          element.removeClass("error");
          }       
      });
  
   $("#form").validate();
  
  });
  </code></pre>
  
  <p>Which styles the following html for each element:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;label for="id-3"&gt;&lt;span&gt;Email address:&lt;/span&gt;&lt;span class="mark"&gt;*&lt;/span&gt;
      &lt;input type="text" class="text required" id="id-3" name="email"/&gt;
      &lt;span class="error_status"&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem I'm having is that I don't know how to subsequently remove the styles after a successful validation.</p>