org.keycloak.validate

## 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, LengthValidator, LocalDateValidator, NotBlankValidator, NotEmptyValidator, PatternValidator, ReadOnlyAttributeUnchangedValidator, RegistrationEmailAsUsernameEmailValueValidator, RegistrationEmailAsUsernameUsernameValueValidator, RegistrationUsernameExistsValidator, UriValidator, UsernameHasValueValidator, UsernameMutationValidator, 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 Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `close()`
    `default ValidationContext` | `validate(Object input)` Validates the given `input`.
    `default ValidationContext` | `validate(Object input, String inputHint)` Validates the given `input` with an additional `inputHint`.
    `default ValidationContext` | `validate(Object input, String inputHint, ValidationContext context)` Validates the given `input` with an additional `inputHint`.
    `ValidationContext` | `validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)` Validates the given `input` with an additional `inputHint` and `config`.
    `default ValidationContext` | `validate(Object input, String inputHint, ValidatorConfig config)` Validates the given `input` with an additional `inputHint`.
    `default ValidationContext` | `validate(Object input, ValidationContext context)` Validates the given `input`.
    `default ValidationContext` | `validate(Object input, ValidatorConfig config)` Validates the given `input` with an additional `config`.

- - ### Method Detail

    - #### 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,
                                             ValidatorConfig config)

      Validates the given `input` with an additional `config`.
      Parameters:
        `input` - the value to validate
        `config` - parameterization for the current validation
      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`

Copyright © 2021 JBoss by Red Hat. All rights reserved.