Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gzvincen opened this issue Dec 29, 2023 · 0 comments

Comments

@gzvincen
Copy link

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信息,不是处理后的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant