title: Ajax submit after parsley.js validation
body: <p>I have a form that submits through ajax. Works fine. However, I am trying to work out how to ONLY submit it if parsley successfully verifies the form.</p>
  
  <p>The issue is that the form submits even if parsley displays an issue. How can I allow for this?</p>
  
  <pre><code>&lt;script&gt;
    $(document).ready(function(){
    $('#newsletterSubscribe').on('submit',function(e) {
  
    $.ajax({
      url:'scripts/newsletter.php',
      data:$(this).serialize(),
      type:'POST',
      success:function(data){
      console.log(data);
      $("#success").show().fadeOut(20000); //=== Show Success Message==
      },
      error:function(data){
      $("#error").show().fadeOut(20000); //===Show Error Message====
      }
    }); 
    e.preventDefault(); //=== To Avoid Page Refresh and Fire the Event "Click"===
    });
    });
  &lt;/script&gt; 
  </code></pre>