Class RequiredValidator
java.lang.Object
com.aquima.interactions.framework.validator.ValidatorBase
com.aquima.interactions.framework.validator.RequiredValidator
- All Implemented Interfaces:
IValidator
,Serializable
Validator implementation that checks is a value isn't empty. The following are considered empty, and thus invalid:
- Any null or UNKNOWN value
- An empty StringValue. A StringValue containing whitespace characters is not considered empty.
- Any empty ListValue regardless of type.
- Since:
- 7.1
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequiredValidator
(String name) Constructs the validator with the definition. -
Method Summary
Modifier and TypeMethodDescriptionboolean
validate
(IValue attrValue, IParameters parameters) This method will be invoked for each value that should be validated by this validator.Methods inherited from class com.aquima.interactions.framework.validator.ValidatorBase
getTypeName
-
Constructor Details
-
RequiredValidator
Constructs the validator with the definition.- Parameters:
name
- The name of the validator type.
-
-
Method Details
-
validate
Description copied from interface:IValidator
This method will be invoked for each value that should be validated by this validator.- Parameters:
attrValue
- The value that should be validated.parameters
- The (optional) parameters that can be used during validation.- Returns:
- Boolean indicating if the value is deemed valid by this validator.
-