Created
July 18, 2019 19:34
-
-
Save KiryhaPikoff/e56f11f202092593e3d2c7133cb8913a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PersonDTO { | |
//TODO add отчество и дату рождения, высчитывать age | |
private Integer id; | |
@NotBlank | |
@Pattern(regexp = "[А-Я][а-я]+", message = "Имя должно состоять только из букв русского алфавита") | |
private String name; | |
@NotBlank | |
@Pattern(regexp = "[А-Я][а-я]+", message = "Имя должно состоять только из букв русского алфавита") //FIXME Фамилия | |
private String surname; | |
@Min(value = 1, message = "Минимальное значение = 1") | |
@Max(value = 150, message = "Максимально значение = 150") //FIXME ое* значение | |
private Integer age; | |
@Pattern(regexp = "^((8|\\+7)[\\- ]?)?(\\(?\\d{3}\\)?[\\- ]?)?[\\d\\- ]{7,10}$") // TODO добавить message | |
private String numberphone; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment