title: Jquery Form validation not working along with Ajax Submit
body: <p>I am facing an issue.<br>
  I have written code for validating my input fields, tested it and it was working fine. Then i implemented form submit using Jquery Ajax post. Now my problem is that the validate function which i implemented earlier is no longer getting called when i click the submit button. Without validation. it is submitting the form. Following is my JS code. Thanks for the help</p>
  
  <pre><code>  $(document).ready(function(){
  
          $('#incForm input').mouseover(function()
          {
              $(this).popover('show')
          });
          $('#incForm input').mouseout(function() {
          $(this).popover('hide')
      });         
  
      $('form').validate({
        rules: {
          problemId: {
            required: true
          },
          problemType: {
            required: true
          }
        },
  
        showErrors: function(errorMap, errorList) {
  
            $.each( this.successList , function(index, value) {
                $(value).popover('hide');
                $(value).parents('.control-group').removeClass('error');
                    $(value).parents('.control-group').addClass('success');
            });
  
            $.each( errorList , function(index, value) { 
                 var _popover = $(value.element).popover({
                      trigger: 'manual',
                      placement: 'top',
                      content: value.message,
                      template: '&lt;div class="popover"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;div class="popover-inner"&gt;&lt;div class="popover-content"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'
                  });
  
                 _popover.data('popover').options.content = value.message;
                 $(value.element).parents('.control-group').addClass('error');
                 $(value.element).popover('show');
  
            });
        }
  
  
      });         
      //if submit button is clicked
      $('#submit').click(function () {       
  
          //show the loading sign
          $('#btSpModal').modal('show') ; 
          $('.loading').show();
  
  
          //start the ajax
          $.ajax({
              //this is the php file that processes the data and send mail
              url: "/~xrenpill/mvc/process_form.php",
  
              //GET method is used
              type: "POST",
  
              data: $("#incForm").serialize(),
              //Do not cache the page
              cache: false,
  
              //success
              success: function (html) {             
                  //if process.php returned 1/true (send mail success)
                  $('#btdpModal').modal('hide') ; 
                  $('.loading').hide();
                  if (html==1) {                 
                      //hide the form
                      $('.form').fadeOut('slow');                
  
                      //show the success message
                      $('.done').fadeIn('slow');
  
                  //if process.php returned 0/false (send mail failed)
                  } else alert('Sorry, unexpected error. Please try again later.');              
              }      
          });
  
          //cancel the submit button default behaviours
          return false;
      });         
      });
  </code></pre>