问答详情
源自:3-13 优化校验规则

result.setErrorMsgMap(true) true报错

if (constraintViolationSet.size()>0){
    //有错误
    result.setErrorMsgMap(true);
    constraintViolationSet.forEach(constraintViolation->{
        String errMsg =constraintViolation.getMessage();
        String propertyName=constraintViolation.getPropertyPath().toString();
        result.getErrorMsgMap().put(propertyName,errMsg);
    });
}
其中result.setErrorMsgMap(true)  true报错


提问者:qq_慕神6028394 2019-10-20 13:50

个回答

  • qq_慕神6028394
    2019-10-20 14:01:53

    我搞错了,不好意思?