我想将错误的名称添加到我的函数中,以便用户知道他们必须检查哪些字段。
这是我目前的功能:
showErrors: function(errorMap, errorList) {
var summary = "Please check following errors:";
$.each(errorList, function() {
summary += " * " + this.message + "<br>" ;
});
$('.errorbox').html(summary);
this.defaultShowErrors();
},
submitHandler: function() {
alert("submitted!");
}
});
我怎样才能做到这一点?