Search in sources :

Example 1 with PasswordsDontMatchValidationError

use of org.summerb.approaches.springmvc.security.ve.PasswordsDontMatchValidationError in project summerb by skarpushin.

the class UsersServiceFacadeImpl method validatePasswordReset.

protected void validatePasswordReset(PasswordReset resetPasswordRequest) throws FieldValidationException {
    ValidationContext ctx = new ValidationContext();
    validatePassword(resetPasswordRequest.getPassword(), ctx);
    if (!resetPasswordRequest.getPassword().equals(resetPasswordRequest.getNewPasswordAgain())) {
        ctx.add(new PasswordsDontMatchValidationError());
    }
    ctx.throwIfHasErrors();
}
Also used : PasswordsDontMatchValidationError(org.summerb.approaches.springmvc.security.ve.PasswordsDontMatchValidationError) ValidationContext(org.summerb.approaches.validation.ValidationContext)

Aggregations

PasswordsDontMatchValidationError (org.summerb.approaches.springmvc.security.ve.PasswordsDontMatchValidationError)1 ValidationContext (org.summerb.approaches.validation.ValidationContext)1