nghuuphuoc 12 years ago
parent
commit
253baab3f0

+ 2 - 1
dist/js/bootstrapValidator.js

@@ -323,7 +323,8 @@
             if (this.numPendingRequests <= 0) {
                 this.numPendingRequests = 0;
                 if (this.formSubmited) {
-                    if (this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
+                    if (!this.submitHandlerCalled && this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
+                        this.submitHandlerCalled = true;
                         this.options.submitHandler.call(this, this, this.$form);
                     } else {
                         this.$form.submit();

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 2 - 1
src/js/bootstrapValidator.js

@@ -323,7 +323,8 @@
             if (this.numPendingRequests <= 0) {
                 this.numPendingRequests = 0;
                 if (this.formSubmited) {
-                    if (this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
+                    if (!this.submitHandlerCalled && this.options.submitHandler && 'function' == typeof this.options.submitHandler) {
+                        this.submitHandlerCalled = true;
                         this.options.submitHandler.call(this, this, this.$form);
                     } else {
                         this.$form.submit();