Class FieldValidationDefinition
java.lang.Object
com.aquima.interactions.composer.model.definition.FieldValidationDefinition
This class contains a single definition of a validation that is defined for a field (value).
- Since:
- 7.1
- Author:
- O. Kerpershoek
-
Constructor Summary
ModifierConstructorDescriptionprotected
FieldValidationDefinition
(IExpressionParser parser, IFieldValidationDS datasource) protected
FieldValidationDefinition
(String type, boolean blocking, boolean essential, IDynamicText message, ICondition condition) -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the condition that should be checked to determine if the validation is applicable for the field.This method returns the text that should be shown in case the validation is not successful.This method returns a map containing additional parameters for the validator.getType()
This method returns the type of the validator that should be used.boolean
This method returns a boolean indicating if the validation is blocking is not successful.boolean
This method returns a boolean indicating if the validation may be considered a fatal error, and further validation of the value is not needed.
-
Constructor Details
-
FieldValidationDefinition
protected FieldValidationDefinition(String type, boolean blocking, boolean essential, IDynamicText message, ICondition condition) -
FieldValidationDefinition
-
-
Method Details
-
getType
This method returns the type of the validator that should be used.- Returns:
- The type (name) of the validator that should be used.
-
getCondition
This method returns the condition that should be checked to determine if the validation is applicable for the field.- Returns:
- The condition that determines if the validation is active.
-
getParameters
This method returns a map containing additional parameters for the validator. This method will always returns a non-null map, but the map may be empty, as not all validator require parameters.- Returns:
- map containing additional parameters for the validator.
-
isBlocking
public boolean isBlocking()This method returns a boolean indicating if the validation is blocking is not successful.- Returns:
- boolean indicating if the validation is blocking is not successful.
-
getMessage
This method returns the text that should be shown in case the validation is not successful.- Returns:
- the text that should be shown in case the validation is not successful.
-
isEssential
public boolean isEssential()This method returns a boolean indicating if the validation may be considered a fatal error, and further validation of the value is not needed.- Returns:
- Boolean indicating that the validation is essential and must succeed for any further validation to be useful.
-