title: ajaxSubmit calls the success callback even when there is an error
body: <p>I'm using jquery.form.js and ajax to submit my forms. The problem I have is even when it's not on success (when there is an error) also the ajax is resetting the form no matter it is in code only to do it on after success.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function()
  {
      $('#FileUploader').on('submit', function(e)
      {
          e.preventDefault();
          $('#submit').attr('disabled', ''); // disable upload button
          //show uploading message
          $("#loadding").html('&lt;div class="loader"&gt;&lt;img src="images/ajax-loader.gif" alt="Please Wait"/&gt; &lt;br/&gt;&lt;span&gt;Submiting...&lt;/span&gt;&lt;/div&gt;');
          $(this).ajaxSubmit({
              target: '#output',
              success:  afterSuccess //call function after success
          });
      });
  });
  
  function afterSuccess()
  {
      $('#FileUploader').resetForm();  // reset form
      $('#submit').removeAttr('disabled'); //enable submit button
      $('#loadding').html('');
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Can someone point out where is the problem. Thanks in advance.</p>