A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
901 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package org.ros.chatto.dto;
  2. import javax.persistence.Transient;
  3. import javax.validation.constraints.NotBlank;
  4. import javax.validation.constraints.Pattern;
  5. import javax.validation.constraints.Size;
  6. import lombok.Data;
  7. @Data
  8. public class UserRegistrationDTO {
  9. @Size(min = 4, max = 10, message = "Username must be between 4 and 10 characters")
  10. @NotBlank(message = "Username should not be blank")
  11. @Pattern(regexp = "^[A-Za-z0-9]+$", message = "Username must be alphanumeric")
  12. private String userName;
  13. @Transient
  14. @Size(min = 4, max = 75, message = "Password must be between 4 and 75 characters")
  15. @NotBlank(message = "Password should not be blank")
  16. // @Pattern(regexp =
  17. // "^.*(?=.{6,})(?=.*d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$", message
  18. // = "Invalid password format")
  19. private String password;
  20. private Long captchaID;
  21. private String captchaText;
  22. private String captchaInput;
  23. }