Class PersonNameProhibitedCharactersValidator
java.lang.Object
org.keycloak.validate.AbstractSimpleValidator
org.keycloak.validate.AbstractStringValidator
org.keycloak.userprofile.validator.PersonNameProhibitedCharactersValidator
- All Implemented Interfaces:
ConfiguredProvider
,Provider
,ProviderFactory<Validator>
,SimpleValidator
,Validator
,ValidatorFactory
public class PersonNameProhibitedCharactersValidator
extends AbstractStringValidator
implements ConfiguredProvider
This validator disallowing bunch of characters we really not to expect in names of persons (fist, middle, last names).
Validates against hardcoded RegEx pattern - accepts plain string and collection of strings, for basic behavior
like null/blank values handling and collections support see AbstractStringValidator
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final PersonNameProhibitedCharactersValidator
static final String
protected static final Pattern
Fields inherited from class org.keycloak.validate.AbstractSimpleValidator
IGNORE_EMPTY_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doValidate
(String value, String inputHint, ValidationContext context, ValidatorConfig config) getId()
Methods inherited from class org.keycloak.validate.AbstractStringValidator
doValidate, skipValidation
Methods inherited from class org.keycloak.validate.AbstractSimpleValidator
isIgnoreEmptyValuesConfigured, 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
Methods inherited from interface org.keycloak.validate.Validator
validate, validate, validate, validate, validate
Methods inherited from interface org.keycloak.validate.ValidatorFactory
validateConfig
-
Field Details
-
ID
- See Also:
-
INSTANCE
-
PATTERN
-
MESSAGE_NO_MATCH
- See Also:
-
CFG_ERROR_MESSAGE
- See Also:
-
-
Constructor Details
-
PersonNameProhibitedCharactersValidator
public PersonNameProhibitedCharactersValidator()
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceProviderFactory<Validator>
-
doValidate
protected void doValidate(String value, String inputHint, ValidationContext context, ValidatorConfig config) - Specified by:
doValidate
in classAbstractStringValidator
-
getHelpText
- Specified by:
getHelpText
in interfaceConfiguredProvider
-
getConfigProperties
- Specified by:
getConfigProperties
in interfaceConfiguredProvider
-