移除tipso的验证后,简化代码

This commit is contained in:
Argo-Surface 2017-01-14 16:17:59 +08:00 committed by Argo-Lenovo
parent 4c8f1e0689
commit d592b945ea
1 changed files with 1 additions and 6 deletions

View File

@ -30,12 +30,7 @@
$('#' + this.options.modal).on('show.bs.modal', function (e) { $('#' + this.options.modal).on('show.bs.modal', function (e) {
if (that.options.validateForm && that.options.validateForm.constructor === String) { if (that.options.validateForm && that.options.validateForm.constructor === String) {
var v = $('#' + that.options.validateForm); var v = $('#' + that.options.validateForm);
var vf = v.validate(); v.validate().resetForm();
vf.currentElements.each(function () {
var $this = $(this);
if ($this.hasClass('tipso_style')) $this.tipso('hide').tipso('destroy');
})
vf.resetForm();
v.find('.has-error, .has-success').removeClass("has-error has-success"); v.find('.has-error, .has-success').removeClass("has-error has-success");
} }
}); });