nghuuphuoc 12 年之前
父节点
当前提交
253baab3f0
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 2 1
      dist/js/bootstrapValidator.js
  2. 1 1
      dist/js/bootstrapValidator.min.js
  3. 2 1
      src/js/bootstrapValidator.js

+ 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();

文件差异内容过多而无法显示
+ 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();