forked from NeilAlishev/SpringCourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPersonDTO.java
More file actions
43 lines (33 loc) · 1.08 KB
/
PersonDTO.java
File metadata and controls
43 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package ru.alishev.springcourse.FirstSecurityApp.dto;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
/**
* @author Neil Alishev
*/
public class PersonDTO {
@NotEmpty(message = "Имя не должно быть пустым")
@Size(min = 2, max = 100, message = "Имя должно быть от 2 до 100 символов длиной")
private String username;
@Min(value = 1900, message = "Год рождения должен быть больше, чем 1900")
private int yearOfBirth;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public int getYearOfBirth() {
return yearOfBirth;
}
public void setYearOfBirth(int yearOfBirth) {
this.yearOfBirth = yearOfBirth;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}