Class DefaultRegistrationValidator

java.lang.Object
com.broadleafcommerce.auth.user.validation.DefaultRegistrationValidator
All Implemented Interfaces:
RegistrationValidator

public class DefaultRegistrationValidator extends Object implements RegistrationValidator
Author:
Phillip Verheyden (phillipuniverse)
  • Constructor Details

  • Method Details

    • validate

      public void validate(UserRegistration registration, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface RegistrationValidator
    • 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)
    • getPasswordValidator

      protected PasswordRequestValidator getPasswordValidator()
    • getAuthRegistrationProperties

      protected AuthRegistrationProperties getAuthRegistrationProperties()