A module which allows to perform data validations. If the validation fails, an Error is thrown. The error type might vary but it will always be a child of VALIDATION:VALIDATION
Configurations
Config
Default configuration
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
String |
The name for this configuration. Connectors reference the configuration with this name. |
x |
|
I18n |
Allows to configure I18n for the standard error messages |
|
Operations
Custom Validator
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Class |
String |
|
||
Ref |
|
|||
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:VALIDATION
Is Blank String
Validates that value is a blank String.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
String |
the value to check |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:NOT_BLANK_STRING
Is Email
Validates that the email address is valid
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
String |
an email address |
x |
||
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_EMAIL
Is Empty Collection
Validates that value is an empty collection.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Values |
Array of Any |
the value to check |
#[payload] |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:NOT_EMPTY_COLLECTION
Is False
Validates that the given value is false
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Expression |
Boolean |
the boolean to test |
false |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_BOOLEAN
Is IP
Validates that an ip address represented as a String is valid
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Ip |
String |
the ip address to validate |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_IP
Is Not Blank String
Validates that value is not a blank String.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
String |
the String to check |
#[payload] |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:BLANK_STRING
Is Not Empty Collection
Validates that value is not an empty collection.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Values |
Array of Any |
the value to check |
#[payload] |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:EMPTY_COLLECTION
Is Not Null
Validates that the given value is not null.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
Any |
the value to test |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:NULL
Is Null
Validates that the given value is null.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
Any |
the value to test |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:NOT_NULL
Is Number
Receives a numeric value as a String and validates that it can be parsed per the rules of a numberType
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
String |
the value to be tested |
x |
|
Locale |
String |
The locale to use for the format. If not provided it defaults to the system Locale |
|
|
Pattern |
String |
The pattern used to format the value |
|
|
Min Value |
String |
If provided, check that the parsed value is greater or equal than this value |
|
|
Max Value |
String |
If provided, check that the parsed value is less or equal than this value |
|
|
Number Type |
Enumeration, one of:
|
the type of number to test value against |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_NUMBER
Is Time
Validates that a time in String format is valid for the given pattern and locale. If no pattern is provided, then the locale's default will be used
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Time |
String |
A date in String format |
x |
|
Locale |
String |
the locale of the String |
|
|
Pattern |
String |
the pattern for the date |
|
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_TIME
Is True
Validates that the given value is true
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Expression |
Boolean |
the boolean to test |
false |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_BOOLEAN
Is URL
Validates that url is a valid one
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
URL |
String |
the URL to validate as a String |
x |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_URL
Matches Regex
Validates that value matches the regex regular expression
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
String |
the value to check |
x |
|
Regex |
String |
the regular expression to check against |
x |
|
Case Sensitive |
Boolean |
when true matching is case sensitive, otherwise matching is case in-sensitive |
true |
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:MISMATCH
Validate Size
Validates that value has a size between certain inclusive boundaries. This validator is capable of handling instances of String, Collection, Map and arrays
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Value |
Any |
the value to validate |
x |
|
Min |
Number |
the minimum expected length (inclusive, defaults to zero) |
0 |
|
Max |
Number |
the maximum expected length (inclusive). Leave unspecified or null to allow any max length |
|
|
Message |
String |
Specifies the message that is to be notified to the user if the validation fails. It's marked as not dynamic to allow eager evaluation of the expression in case that the validation is successful and the message is not needed. Components consuming this value are to manually check if this is an expression and evaluate it in case that the validation failed |
|
For Configurations.
Throws
-
VALIDATION:INVALID_SIZE
Types
I18n
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Bundle Path |
String |
x |
||
Locale |
String |