Interface Validator

All Superinterfaces:
Provider
All Known Subinterfaces:
SimpleValidator
All Known Implementing Classes:
AbstractNumberValidator, AbstractSimpleValidator, AbstractStringValidator, AttributeRequiredByMetadataValidator, BlankAttributeValidator, BrokeringFederatedUsernameHasValueValidator, DoubleValidator, DuplicateEmailValidator, DuplicateUsernameValidator, EmailExistsAsUsernameValidator, EmailValidator, ImmutableAttributeValidator, IntegerValidator, IsoDateValidator, LengthValidator, LocalDateValidator, MultiValueValidator, NotBlankValidator, NotEmptyValidator, OptionsValidator, OrganizationMemberValidator, PatternValidator, PersonNameProhibitedCharactersValidator, ReadOnlyAttributeUnchangedValidator, RegistrationEmailAsUsernameEmailValueValidator, RegistrationEmailAsUsernameUsernameValueValidator, RegistrationUsernameExistsValidator, UriValidator, UsernameHasValueValidator, UsernameIDNHomographValidator, UsernameMutationValidator, UsernameProhibitedCharactersValidator, ValidatorConfigValidator

public interface Validator extends Provider
Validates given input in a ValidationContext.

Validations can be supported with an optional inputHint, which could denote a reference to a potentially nested attribute of an object to validate.

Validations can be configured with an optional config Map.

  • Method Details

    • validate

      default ValidationContext validate(Object input)
      Validates the given input.
      Parameters:
      input - the value to validate
      Returns:
      the validation context with the outcome of the validation
    • validate

      default ValidationContext validate(Object input, ValidationContext context)
      Validates the given input.
      Parameters:
      input - the value to validate
      context - the validation context
      Returns:
      the validation context with the outcome of the validation
    • validate

      default ValidationContext validate(Object input, String inputHint)
      Validates the given input with an additional inputHint.
      Parameters:
      input - the value to validate
      inputHint - an optional input hint to guide the validation
      Returns:
      the validation context with the outcome of the validation
    • validate

      default ValidationContext validate(Object input, String inputHint, ValidatorConfig config)
      Validates the given input with an additional inputHint.
      Parameters:
      input - the value to validate
      inputHint - an optional input hint to guide the validation
      config - parameterization for the current validation
      Returns:
      the validation context with the outcome of the validation
    • validate

      default ValidationContext validate(Object input, String inputHint, ValidationContext context)
      Validates the given input with an additional inputHint.
      Parameters:
      input - the value to validate
      inputHint - an optional input hint to guide the validation
      context - the validation context
      Returns:
      the validation context with the outcome of the validation
    • validate

      ValidationContext validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)
      Validates the given input with an additional inputHint and config.
      Parameters:
      input - the value to validate
      inputHint - an optional input hint to guide the validation
      context - the validation context
      config - parameterization for the current validation
      Returns:
      the validation context with the outcome of the validation
    • close

      default void close()
      Specified by:
      close in interface Provider