jQuery - How to simulate an error event for ajaxSubmit
<p>I use the ajaxSubmit to submit my form and would like to test the case where the event returns error.</p>

<pre><code>  var options = {
    beforeSubmit: showRequest,  // pre-submit callback 
    success:      showResponse, // post-submit callback 
    error:        printError,
    url:          '../validation.php'
  };
  $('#form1').submit(function () {
    $(this).ajaxSubmit(options);
    return false;
  });
</code></pre>

<p>In other words, I need to know how to simulate an error event so that I can test the function printError.</p>

<p>Thank you</p>
