Class UniqueUsernameValidator

  • All Implemented Interfaces:
    org.springframework.validation.Validator

    public class UniqueUsernameValidator
    extends Object
    implements org.springframework.validation.Validator
    Validates that username does not exist, yet.
    • Constructor Detail

      • UniqueUsernameValidator

        public UniqueUsernameValidator​(org.springframework.context.MessageSource messageSource,
                                       UserService userService)
    • Method Detail

      • supports

        public boolean supports​(Class<?> clazz)
        Specified by:
        supports in interface org.springframework.validation.Validator
      • validate

        public void validate​(Object target,
                             org.springframework.validation.Errors errors)
        Specified by:
        validate in interface org.springframework.validation.Validator