Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import javax.validation.constraints.NotNull;
  2. import javax.validation.constraints.NotEmpty;
  3. import javax.validation.constraints.Email;
  4. import javax.validation.constraints.Size;
  5.  
  6. public class User {
  7.  
  8. @NotNull(message = "Id must be not null")
  9. private Long id;
  10.  
  11. @Email(message = "Email must be valid")
  12. @NotEmpty(message = "Email must be not null/empty")
  13. private String email;
  14.  
  15. @Size(min = 8, message = "Password must be of min 8 characters")
  16. @NotEmpty(message = "Password must be not null/empty")
  17. private String password;
  18.  
  19. // Constructor, Setters and Getters
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement