File tree 1 file changed +4
-3
lines changed
src/main/java/de/rwth/idsg/steve/web/dto
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
package de .rwth .idsg .steve .web .dto ;
20
20
21
- import jakarta .validation .constraints .AssertTrue ;
21
+ import jakarta .validation .constraints .AssertFalse ;
22
22
import jakarta .validation .constraints .NotNull ;
23
23
import jakarta .validation .constraints .Size ;
24
24
import lombok .Getter ;
@@ -39,7 +39,7 @@ public class WebUserForm extends WebUserBaseForm {
39
39
@ Size (min = 8 , message = "The repeated password also requires 8 or more characters" )
40
40
private String passwordComparison ;
41
41
42
- @ AssertTrue (message = "The repeated password did not match!" )
42
+ @ AssertFalse (message = "The repeated password did not match!" )
43
43
private Boolean pwError ;
44
44
45
45
private String apiToken = "" ;
@@ -49,9 +49,10 @@ public void setPassword(String password) {
49
49
}
50
50
51
51
public void setPasswordComparison (String passwordComparison ) {
52
+ this .pwError = true ;
52
53
this .passwordComparison = passwordComparison ;
53
54
if (passwordComparison != null ) {
54
- this .pwError = passwordComparison .equals (this .password );
55
+ this .pwError = ! passwordComparison .equals (this .password );
55
56
}
56
57
}
57
58
You can’t perform that action at this time.
0 commit comments