Package org.keycloak.validate.validators
Class LocalDateValidator
- java.lang.Object
-
- org.keycloak.validate.AbstractSimpleValidator
-
- org.keycloak.validate.AbstractStringValidator
-
- org.keycloak.validate.validators.LocalDateValidator
-
- All Implemented Interfaces:
ConfiguredProvider
,Provider
,ProviderFactory<Validator>
,SimpleValidator
,Validator
,ValidatorFactory
public class LocalDateValidator extends AbstractStringValidator implements ConfiguredProvider
A date validator that only takes into account the format associated with the current locale.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ID
static LocalDateValidator
INSTANCE
static String
MESSAGE_INVALID_DATE
-
Fields inherited from class org.keycloak.validate.AbstractSimpleValidator
IGNORE_EMPTY_VALUE
-
-
Constructor Summary
Constructors Constructor Description LocalDateValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doValidate(String value, String inputHint, ValidationContext context, ValidatorConfig config)
List<ProviderConfigProperty>
getConfigProperties()
String
getHelpText()
String
getId()
protected boolean
isIgnoreEmptyValuesConfigured(ValidatorConfig config)
Default implementation only looks forAbstractSimpleValidator.IGNORE_EMPTY_VALUE
configuration option.ValidationResult
validateConfig(KeycloakSession session, ValidatorConfig config)
Validates the given validation config.-
Methods inherited from class org.keycloak.validate.AbstractStringValidator
doValidate, skipValidation
-
Methods inherited from class org.keycloak.validate.AbstractSimpleValidator
validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfig
-
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Methods inherited from interface org.keycloak.validate.SimpleValidator
close, create, init, postInit
-
-
-
-
Field Detail
-
INSTANCE
public static final LocalDateValidator INSTANCE
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
MESSAGE_INVALID_DATE
public static final String MESSAGE_INVALID_DATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceProviderFactory<Validator>
-
doValidate
protected void doValidate(String value, String inputHint, ValidationContext context, ValidatorConfig config)
- Specified by:
doValidate
in classAbstractStringValidator
-
validateConfig
public ValidationResult validateConfig(KeycloakSession session, ValidatorConfig config)
Description copied from interface:ValidatorFactory
Validates the given validation config.Implementations can use the
KeycloakSession
to validate the givenValidatorConfig
.- Specified by:
validateConfig
in interfaceValidatorFactory
- Parameters:
session
- theKeycloakSession
config
- the config to be validated- Returns:
- the validation result
-
getHelpText
public String getHelpText()
- Specified by:
getHelpText
in interfaceConfiguredProvider
-
getConfigProperties
public List<ProviderConfigProperty> getConfigProperties()
- Specified by:
getConfigProperties
in interfaceConfiguredProvider
-
isIgnoreEmptyValuesConfigured
protected boolean isIgnoreEmptyValuesConfigured(ValidatorConfig config)
Description copied from class:AbstractSimpleValidator
Default implementation only looks forAbstractSimpleValidator.IGNORE_EMPTY_VALUE
configuration option.- Overrides:
isIgnoreEmptyValuesConfigured
in classAbstractSimpleValidator
- Parameters:
config
- to get option from- Returns:
-
-