@@ -6,7 +6,8 @@ Not released yet
__Fixes__:
-[#77, #117: ```notEmpty``` validator doesn't work on file input](https://github.com/nghuuphuoc/bootstrapvalidator/issues/117)
+* [#77, #117: ```notEmpty``` validator doesn't work on file input](https://github.com/nghuuphuoc/bootstrapvalidator/issues/117)
+* [#105: Cannot call ```form.submit()``` inside ```submitHandler```](https://github.com/nghuuphuoc/bootstrapvalidator/issues/105)
## v0.3.2
@@ -20,7 +20,7 @@
<h2>Custom submit handler</h2>
</div>
- <form id="defaultForm" method="post" class="form-horizontal">
+ <form id="defaultForm" method="post" class="form-horizontal" action="target.php">
<div class="alert alert-success" style="display: none;"></div>
<div class="form-group">
@@ -275,6 +275,8 @@
// Call the custom submission if enabled
if (this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
+ // Turn off the submit handler, so user can call form.submit() inside their submitHandler method
+ this.$form.off('submit.bootstrapValidator');
this.options.submitHandler.call(this, this, this.$form, this.$submitButton);
} else {
// Submit form
@@ -274,6 +274,8 @@