title: Jquery validate plugin -submitHandler set as default to work across multiple forms?
body: <p>I was trying to build this validation module using JQuery Validate Plugin, working across multiple forms. So, I decided to put the common functions/rules in the jQuery.validator.setDefaults() method that the plugin provides. So, only the success function of the plugin needs to be in different places.</p>
  
  <pre><code>$("#myForm").validate(
     success: function(label){
        window.location = someURL;
     }
  );
  </code></pre>
  
  <p>SubmitHandler was one of them (in the setDefaults method), and it doesn't seem to be working. I'm getting the default page on clicking submit, if the form is invalid. Is there a return false or preventDefault() kind of a thing for submitHandler()?</p>
  
  <pre><code>$.validator.setDefaults({
    submitHandler: function(form){
      var url = $(form).attr('action') ;
      var data = $(form).serialize()+'&amp;ajax_validation=1';
      $.ajax({
        url: url,
        data: data,
        type: 'POST',
        success: function(response) {
          //something
        }
      });
    }
  });
  </code></pre>
  
  <p>Can anybody help? Somebody who has tried to deal with multiple forms using jQuery validate plugin? Help will be appreciated. Let me know if elaboration needed.</p>