Class DefaultRegistrationValidator

    • Method Detail

      • validateUserType

        protected void validateUserType​(UserRegistration registration,
                                        org.springframework.validation.Errors errors)
        Validate the UserRegistration.getUserType(). By default, this disallows all user types other than UserType.CUSTOMER for security purposes. For example, we don't want to allow someone to create a new UserType.ADMIN user through the registration flow.
        Parameters:
        registration - the user registration to validate
        errors - the errors object on which to register validation errors
      • validatePasswordConfirmation

        protected void validatePasswordConfirmation​(UserRegistration registration,
                                                    org.springframework.validation.Errors errors)
      • prefixWithEntityValidationMessageKey

        protected String prefixWithEntityValidationMessageKey​(String errorCode)