title: jQuery: Intercept submit after validation
body: <p>I'm using the validation plugin of jQuery to check some values of my form. The validation works fine, but now I'd like to check something else, before submitting the form.</p>
  
  <p>This is the additional check, which should only be run after all fields of the form have been validated successfully:</p>
  
  <pre><code>$("#formname").submit(function() {
      if($("#input").val() == $("#hiddenInput").val() {
          // Everything fine, may submit
          return true;
      } else {
          // Check wasn't successfull, let's alert
          alert("Fix the input");
          return false;
      }
  })
  </code></pre>
  
  <p>This is the actual validation with the plugin:</p>
  
  <pre><code>$("#formname").validate({
      rules: {
          ou: {
              required: true,
              minlength: 2,
              number: true
          },
          directors: {
              required: true,
              number: true
          }
      },
      messages: {
          ou: {
              required: "Message",
              minlength: "Message",
              number: "Message"
          },
          directors: {
              required: "Message",
              number: "Message"
          }
      },
      errorPlacement: function ($error, $element) {
          var name = $element.attr("name");
  
          $("#" + name + "Error").append($error);
      }
  })
  </code></pre>
  
  <p>I did actually add the first code snippet to the beginning, but it will be run every time I click on submit, no matter if the validation itself was successfull. Is there some kind of validation return code or event I could check for?</p>