From 7ddae1a4270935432f40ec5af27a7801655271cb Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Tue, 15 Nov 2016 11:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG=EF=BC=9A=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=BC=96=E8=BE=91=E5=BC=B9=E6=A1=86validate=E5=90=8E?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=A2=AB=E4=BF=9D=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/framework.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Bootstrap.Admin/Content/js/framework.js b/Bootstrap.Admin/Content/js/framework.js index 99ef379b..c0daf630 100644 --- a/Bootstrap.Admin/Content/js/framework.js +++ b/Bootstrap.Admin/Content/js/framework.js @@ -33,9 +33,11 @@ if (this.options.modal && this.options.modal.constructor === String) { $('#' + this.options.modal).on('show.bs.modal', function (e) { if (that.options.validateForm.constructor === String) { - var v = $('#' + that.options.validateForm).validate(); - v.currentElements.each(function () { $(this).popover('destroy'); }) - v.resetForm(); + var v = $('#' + that.options.validateForm); + var vf = v.validate(); + vf.currentElements.each(function () { $(this).popover('destroy'); }) + vf.resetForm(); + v.find('div.form-group').removeClass("has-error has-success"); } }); }