Package org.keycloak.validate.validators
Class NotEmptyValidator
- java.lang.Object
-
- org.keycloak.validate.validators.NotEmptyValidator
-
- All Implemented Interfaces:
Provider
,ProviderFactory<Validator>
,SimpleValidator
,Validator
,ValidatorFactory
public class NotEmptyValidator extends Object implements SimpleValidator
Check that input value is not empty. It means it is not null for all data types. For String it also have to be non-empty string (no trim() performed). ForCollection
andMap
it also means it is not empty.- See Also:
NotBlankValidator
-
-
Field Summary
Fields Modifier and Type Field Description static String
ID
static NotEmptyValidator
INSTANCE
static String
MESSAGE_ERROR_EMPTY
-
Constructor Summary
Constructors Constructor Description NotEmptyValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
ValidationContext
validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)
Validates the giveninput
with an additionalinputHint
andconfig
.-
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.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, validate
-
Methods inherited from interface org.keycloak.validate.ValidatorFactory
validateConfig
-
-
-
-
Field Detail
-
INSTANCE
public static final NotEmptyValidator INSTANCE
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
MESSAGE_ERROR_EMPTY
public static final String MESSAGE_ERROR_EMPTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceProviderFactory<Validator>
-
validate
public ValidationContext validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)
Description copied from interface:Validator
Validates the giveninput
with an additionalinputHint
andconfig
.
-
-