Skip to content

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

Description

@gzvincen

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions