title: jquery validation plugin working ok first time you validate but not subsequent times
body: <p>I have the following form which is added to a page via ajax</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
  
          jQuery.validator.setDefaults({
              errorPlacement: function(error, element) {
                   error.appendTo('#invalid_' + element.attr('id'));
              }
          });
  
          var validator = $("#login_form").validate({
              rules: {
                  user_email: {
                    required: true,
                    email: true
                  },
                  password: {
                      required: true
                  }
              }
          });
      });
  
  &lt;/script&gt;
  
  &lt;form id="login_form"&gt;
  &lt;center&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
      &lt;div class="login_div"&gt;
          &lt;center&gt;&lt;h3&gt;Log In&lt;/h3&gt;
          &lt;table align="center" width="400px"&gt;
              &lt;tr&gt;&lt;td class="input_td"&gt;Email:&lt;/td&gt;&lt;td class="textfield_td"&gt;&lt;input type="text" class="textfield" id="user_email" name="user_email"/&gt;&lt;/td&gt;&lt;/tr&gt;
              &lt;tr&gt;&lt;td colspan="2" id="invalid_user_email"&gt;&lt;/td&gt;&lt;/tr&gt;
              &lt;tr&gt;&lt;td class="input_td"&gt;Password:&lt;/td&gt;&lt;td class="textfield_td"&gt;&lt;input type="password" class="textfield" id="password" name="password"/&gt;&lt;/td&gt;&lt;/tr&gt;
              &lt;tr&gt;&lt;td colspan="2" id="invalid_password"&gt;&lt;/td&gt;&lt;/tr&gt;
              &lt;tr&gt;&lt;td colspan="2" class="error_text" id="login_error"&gt;&lt;/td&gt;&lt;/tr&gt;
          &lt;/table&gt;
          &lt;input  type="button" onclick="check_login();" value="Log In"/&gt;&lt;/center&gt;
      &lt;/div&gt;
  &lt;/center&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The <code>check_login</code> method has this structure: <code>if($("#login_form").valid()) {do something} else {return;}</code></p>
  
  <p>When i click the Log in button the first time the form validates correctly e.g. If fields are missing or an invalid email is supplied then the appropriate error messages are shown. However if i then click the log in button again the <code>valid()</code> method returns true even if fields are missing or there is an invalid email and no error messages are shown.</p>
  
  <p>thanks for any light you can shed on this</p>
  
  <p>EDIT: This solution appears to work where login is the id of the button</p>
  
  <pre><code>$("#login").click(function() {
  
      validator.resetForm();
      if(validator.form()) {
           alert('valid');
  
      }
      else {
          return;
      }
  
  
  });
  </code></pre>