前端:表单校验
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);
}
});