if (VALIDATE_EDIT_ACCOUNT.equals(validation) || VALIDATE_NEW_ACCOUNT.equals(validation)) {
if (VALIDATE_NEW_ACCOUNT.equals(validation)) {
account.setStatus("OK");
validateRequiredField(account.getUsername(), "User ID is required.");
if (account.getPassword() == null || account.getPassword().length() < 1 || !account.getPassword().equals(repeatedPassword)) {
ctx.addSimpleError("Passwords did not match or were not provided. Matching passwords are required.");
}
}
if (account.getPassword() != null && account.getPassword().length() > 0) {
if (!account.getPassword().equals(repeatedPassword)) {
ctx.addSimpleError("Passwords did not match.");