package com.jzdsh.auto.app.controller.admin.mvalidator;


import com.jfinal.core.Controller;
import com.jfinal.kit.Ret;
import com.jfinal.validate.Validator;
import com.jzdsh.auto.model.Quality;

/**
 * @ProjectName: auto
 * @Package: com.jzdsh.auto.app.controller.admin.mvalidator
 * @ClassName: AdminQualityValidator
 * @Author: Jzdsh
 * @Description: 品质信息表单验证
 * @Date: 2020/3/28 17:45
 * @Version: 1.0
 */
public class AdminQualityValidator extends Validator {

    @Override
    protected void validate(Controller c) {
        setShortCircuit(true);
        setRet(Ret.fail( ));

        String tag = c.get("quality.tag");
        String days = c.get("days");
    }

    @Override
    protected void handleError(Controller c) {
        c.keepModel(Quality.class);
        c.renderJson(getRet( ));
    }
}
