title: Combining JQuery Validation followed by ajax post
body: <p>I'm sure this is simple but I'm new to JQuery.  I am using the JQuery plugin to validate an email address, this works and the code is:</p>
  
  <pre><code>$(document).ready(function () {
      $("#email").click(function () {
          $(this).attr({value: ''});
      });
      $("#subscribe-form").validate();
  });
  </code></pre>
  
  <p>What I then want to do is to post the email address using an ajax post, again this code works fine without the validator:</p>
  
  <pre><code>$(document).ready(function () {
      $('#submit').click(function () {
          var email = $('#email').val();
          var data = "email=" + email;
          $.ajax({
              type: "POST",
              url: "subscript.php",
              data: data,
          });
      });
  });
  </code></pre>
  
  <p>What I don't seem to be able to do is combine them both, so that if the email is valid it will then post.  I'd really appreciate help on how to do this.</p>
  
  <p>Thanks very much</p>