validator icon indicating copy to clipboard operation
validator copied to clipboard

单纯使用ValidHelper,如何处理原始的注解,例如@NotNull?

Open gzvincen opened this issue 1 year ago • 0 comments

User 就是validator-test中的User类,做了如下改动: //@HasNotNull({"nickName"}) private String name; @NotNull private String nickName;

User user = new User();

IResult iResult = ValidHelper.failFast(user);

//返回:{javax.validation.constraints.NotNull.message} String message = iResult.notPassList().get(0).message();

返回是@NotNull的message信息,不是处理后的

gzvincen avatar Dec 29 '23 06:12 gzvincen