This site contains the document for old version. Please upgrade to the latest version v1.0.0

Upgrading to v0.5.0

News

From v0.5.0, we remove the submitHandler option. In v0.5.0, use the success.form.bv event instead.

In v0.4.5 and earlier versions:

$(form).bootstrapValidator({
    submitHandler: function(form, validator, submitButton) {
        ...
    }
});

In v0.5.0:

$(form)
    .bootstrapValidator({
        // Removing submitHandler option
    })
    .on('success.form.bv', function(e) {
        // Prevent form submission
        e.preventDefault();

        var $form        = $(e.target),
            validator    = $form.data('bootstrapValidator'),
            submitButton = validator.getSubmitButton();

        // Do whatever you want here ...
    });

Download