jquery validate 失去焦点时移除错误提示

来源:互联网 发布:人工智能的研究内容 编辑:程序博客网 时间:2024/06/06 02:11
红色区块为去除错误提示信息,淡蓝色区块为 怎样去除错误信息(自定义)蓝色区块为设置错误信息显示的位置

$("#formMail").validate({rules:{phone :{isMobile : true},newPsw:{minlength: 6},reNewPsw:{minlength: 6,equalTo: "#newPsw"}},<span style="background-color: rgb(51, 51, 255);">errorPlacement: function(error, element) {element.parent().next().text($(error).text());}</span>,        <span style="background-color: rgb(255, 102, 102);">showErrors: function(errorMap, errorList) {            this.defaultShowErrors();            for(var i = 0; i < errorList.length; i++) {       $(errorList[i].element).one("blur", function() {       </span><span style="background-color: rgb(204, 255, 255);">if(!$('input[name='+this.name+']').hasClass('error')){       $('input[name='+this.name+']').parent().next().text('');       }</span><span style="background-color: rgb(255, 102, 102);">                       });            }        }</span>});


0 0