前端:表单校验

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);
    }
});
posted @ 2019-01-11 09:52  xuejianbest  阅读(576)  评论(0编辑  收藏  举报