有谁知道我如何用一个命令删除ValidationEngine创建的所有错误?我添加了插件似乎用于创建弹出窗口的代码片段.如果您需要更多信息,请告诉我.
buildPrompt : function(caller,promptText,type,ajaxed) { // ERROR PROMPT CREATION AND DISPLAY WHEN AN ERROR OCCUR if(!$.validationEngine.settings){ $.validationEngine.defaultSetting() } deleteItself = "." + $(caller).attr("id") + "formError" if($(deleteItself)[0]){ $(deleteItself).stop(); $(deleteItself).remove(); } var divFormError = document.createElement('div'); var formErrorContent = document.createElement('div'); linkTofield = $.validationEngine.linkTofield(caller) $(divFormError).addClass("formError") if(type == "pass") $(divFormError).addClass("greenPopup") if(type == "load") $(divFormError).addClass("blackPopup") if(ajaxed) $(divFormError).addClass("ajaxed") $(divFormError).addClass(linkTofield); $(formErrorContent).addClass("formErrorContent");
源代码:http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
解决方法
它还在验证引擎中具有预定义的功能.
$('#formID1').validationEngine('hideAll');