1 package com.dto;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import org.hibernate.validator.constraints.NotEmpty;
25
26 import javax.validation.constraints.NotNull;
27 import javax.validation.constraints.Size;
28
29
30
31
32 public class UserPasswordRequestDto {
33 @NotNull(message = "{FieldCanNotBeEmpty}")
34 @NotEmpty(message = "{FieldCanNotBeEmpty}")
35 private String currentPassword;
36
37 @NotNull(message = "{FieldCanNotBeEmpty}")
38 @NotEmpty(message = "{FieldCanNotBeEmpty}")
39 @Size(min = 6, message = "{WrongPasswordLength}")
40 private String newPassword;
41
42 public String getCurrentPassword(){
43 return this.currentPassword;
44 }
45 public void setCurrentPassword(String value){
46 this.currentPassword = value;
47 }
48
49 public String getNewPassword(){
50 return this.newPassword;
51 }
52 public void setNewPassword(String value){
53 this.newPassword = value;
54 }
55 }