title: Stopping default form submit in Bootstrap Validator Form
body: <p>I have seen this asked a couple of times, but they don't seem to apply in my situation.</p>
  
  <p>My form is being submitted before the validation is tested.</p>
  
  <p>form:</p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/user/fact" data-bv-submitbuttons="button[type='submit']" data-remote="true" data-toggle="validator" id="user_fact_form" method="post" role="form"&gt;&lt;div style="margin:0;padding:0;display:inline"&gt;&lt;input name="utf8" type="hidden" value="&amp;#x2713;" /&gt;&lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label for="key"&gt;Title&lt;/label&gt;
      &lt;input class="form-control" id="key" name="key" type="text" value="" /&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label for="value"&gt;Value&lt;/label&gt;
      &lt;input class="form-control" id="value" name="value" type="text" value="" /&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;input class="btn btn-primary" disable="true" name="commit" type="submit" value="Add" /&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>javascript:</p>
  
  <pre><code>$('#user_fact_form').bootstrapValidator({
    live: 'enabled',
    message: 'This value is not valid',
    submitButton: '$user_fact_form button[type="submit"]',
    submitHandler: function(validator, form, submitButton) {
        $.post(form.attr('action'), form.serialize(), function (result) {
            $("#facts_tbody").append(result.data);
        });
        return false;
    },
    feedbackIcons: {
        valid: 'glyphicon glyphicon-ok',
        invalid: 'glyphicon glyphicon-remove',
        validating: 'glyphicon glyphicon-refresh'
    },
    fields: {
        key: {
            selector: '#key',
            validators: {
                notEmpty: {
                    message: 'The title is required and cannot be empty'
                }
            }
        },
        value: {
            selector: '#value',
            validators: {
                notEmpty: {
                    message: 'The value is required and cannot be empty'
                }
            }
        }
    }
  });
  </code></pre>
  
  <p>Any ideas how I can disable the submit button until the form is validated?</p>