Created
December 19, 2013 07:06
-
-
Save leonardinius/8035458 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 static class PasswordChange { | |
@MinLength(5) | |
@Required | |
public String password; | |
@MinLength(5) | |
@Required | |
public String repeatPassword; | |
public String getPassword() { | |
return password; | |
} | |
public void setPassword(String password) { | |
this.password = password; | |
} | |
public String getRepeatPassword() { | |
return repeatPassword; | |
} | |
public void setRepeatPassword(String repeatPassword) { | |
this.repeatPassword = repeatPassword; | |
} | |
public String validate() { | |
if (password == null || !password.equals(repeatPassword)) { | |
return Messages.get("auth.change_password.error.passwords_not_same"); | |
} | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment