form.validate({
rules: {
schedule_name: "required",
task_name: "required",
schedule_plan_rule : "required"
},
messages: {
schedule_name: "请输入任务名称",
task_name: "请选择调度对象",
schedule_plan_rule : "请填写调度规则"
},
errorPlacement: function errorPlacement(error, element) {
element.after(error);
}
});
转载于:https://www.cnblogs.com/xuejianbest/p/10284968.html