开发者

How to disable the jquery.validate error indications

I had used Jquery validate plugin to check out error and i had submitted the thing via ajax. since i am using same form for two purpose. One for add form, and another for edit form.

Once user check on submit button on add form. some error would be display on screen. We he/she toggle to edit form. I need to wash out that error and use to jquery.validate as a fresh. Remember i am using single validation script for both add and edit form. Form is same but开发者_Go百科 during submission different action occurs.

I need to wash out errors of jquery.validate while toggling add to edit screen or viceversa.

Thanks in advance...


Try resetForm().

Resets the controlled form.

Resets input fields to their original value (requires form plugin), removes classes indicating invalid elements and hides error messages.

Usage

var validator = $(...).validate();
validator.resetForm();

Dependency: jQuery Form Plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜