我在我的页面中有这个 Jquery,我将在其中收到基于规则集的错误消息。它工作正常!只需要知道我可以进行哪些更改以在页面底部获取错误消息,而不是靠近每个文本框。
提交按钮旁边需要错误消息并突出显示错误状态的文本框,如果它们是多个错误,将不胜感激
<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
<script src="http://jquery.bassistance.de/validate/additional-methods.js"></script>
<script>
var ruleSet1 = {
required: true
};
var ruleSet3 = {
minlength: 5,
};
$( '#AddReport').validate({
rules:{
ReportID: ruleSet1,
TaskID: ruleSet1,
Assist: ruleSet3,
Guide: ruleSet3,
DateInput: ruleSet1,
ButtonCreationDemoInput2: ruleSet1,
ButtonCreationDemoInput: ruleSet1,
RefNo: ruleSet3,
Remarks: ruleSet3,
EDocNo: ruleSet3,
WorkLocation: ruleSet1,
Content: ruleSet3
}
});
</script>