ValidationUtils.rejectIfEmptyOrWhitespace(errors, "oldPassword",
"required");
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "newPassword",
"required");
PasswordChangeCommand comm = (PasswordChangeCommand) command;
if (comm.getNewPassword().equals(comm.getOldPassword())) {
errors.rejectValue("newPassword", "invalid");
}
}