title: BootstrapValidator Not Validating on AJAX Form
body: <p>I've currently created an AJAX contact form that I'm using on my site and am using BootstrapValidator to validate the fields.  I've got e.PreventDefault() line in the code; but, when I press submit the form is submitting even if validation fails (though the error messages due appear on the form).  I can't figure out how to stop the submit from working on the validation despite following the example at <a href="http://bootstrapvalidator.com/examples/ajax-submit/" rel="nofollow">http://bootstrapvalidator.com/examples/ajax-submit/</a>.  Anyone have any ideas?</p>
  
  <p>JSFiddle: <a href="http://jsfiddle.net/5dpm655v/1/" rel="nofollow">http://jsfiddle.net/5dpm655v/1/</a></p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/echo/json/" data-remote="true" id="contact_form" method="post"&gt;
  &lt;label for="name"&gt;Name&lt;/label&gt;
  &lt;div class="row margin-bottom-20"&gt;
      &lt;div class="col-md-7 col-md-offset-0"&gt;
          &lt;input class="form-control" id="name" name="name" type="text" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;label for="email"&gt;Email&lt;/label&gt;
  &lt;div class="row margin-bottom-20"&gt;
      &lt;div class="col-md-7 col-md-offset-0"&gt;
          &lt;input class="form-control" id="email" name="email" type="text" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;label for="message"&gt;Message&lt;/label&gt;
  &lt;div class="row margin-bottom-20"&gt;
      &lt;div class="col-md-11 col-md-offset-0"&gt;
          &lt;textarea class="form-control" id="message" name="message" rows="8"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
      &lt;button type="submit" class="btn-u"&gt;Send Message&lt;/button&gt; 
      &lt;span id="contact-form-success" style="display:none;"&gt;Message successfully sent.  We'll be in touch shortly!&lt;/span&gt;
      &lt;span id="contact-form-error" style="display:none;"&gt;Error: I'm sorry, we weren't able to successfully send your message.  Please try again.&lt;/span&gt;
  &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JQuery</p>
  
  <pre><code>    jQuery(document).ready(function() {
          $('form#contact_form')
          .bootstrapValidator({
              fields: {
                  name: {
                      validators: {
                          notEmpty: {
                              message: 'Name is required and cannot be empty'
                          }
                      }
                  },
                  email: {
                      validators: {
                          notEmpty: {
                              message: 'Email is required and cannot be empty'
                          },
                          emailAddress: {
                              message: 'This is not a valid email address'
                          }
                      }
                  },
                  message: {
                      validators: {
                          notEmpty: {
                              message: 'Message is required and cannot be empty'
                          }
                      }
                  }
              }
          })
          .on('success.form.bv', function(e) {
            e.preventDefault();
            var valuesToSubmit = $(this).serialize();
            $.ajax({
              url: $(this).attr('action'),
              data: valuesToSubmit,
              dataType: 'json',
              type: 'POST',
              success: function(data) {
                  $('input#name').val('');
                  $('input#email').val('');
                  $('textarea#message').val('');
                  $('#contact-form-success').show().fadeOut(10000);
              },
              error: function(data) {
                  $('#contact-form-error').show().fadeOut(10000);
              }
           });
        });
    });
  </code></pre>