title: Need jQuery.validate to prevent Ajax form submission
body: <p>I'm using the <a href="http://docs.jquery.com/Plugins/Validation" rel="nofollow noreferrer">jQuery.validate()</a> to validate my form before it is submitted.
  Now that I am using Ajax to submit my form, I have a problem.</p>
  
  <p><strong>Note:</strong> I am not using the jQuery form plugin. Just so that is clear :)</p>
  
  <p>The jQuery.validate() is fired, but the form submission is also executed.</p>
  
  <p>I don't want the form to be submitted until the validator is ok. Any god suggestions on how I can accomplish this?</p>
  
  <p><strong>UPDATE</strong> <br /></p>
  
  <p>I found the answer. I had to use the submitHandler. Now my form is only submitted if all the required fields are corectly populated.</p>
  
  <p>and here's how:</p>
  
  <pre><code>if( jQuery('#my_form').length &gt; 0 ) {
    jQuery("#my_form").validate({
       rules: {
         brand_name: "required",
         brand_email: {email: true },
         brand_description: "required"
       },
         submitHandler: function() { processRegistration(jQuery("#my_form").attr("id"), jQuery("#my_form").serialize());  }
    });  
  
  
  } 
  </code></pre>