InputParameterRegexValidatorValve
Note
Valve that validates an input parameter using a regular expression.
If input parameter is missing or the regular expression does not match, flow will fail ("Invalid request").
Uses java regex implementation: Pattern (Java SE 11 & JDK 11 )
Note: Escape requires double '\' ("regex" : ".+@example\\.com+").
Properties
| Name | Description | Default value | Mandatory | Supports property expansion |
|---|---|---|---|---|
| param_name | Name of input parameter to validate. | Yes | No | |
| regex | The regular expression. | Yes | No |
Example Configuration
{
"name": "InputParameterRegexValidatorValve",
"enabled": "true",
"config": {
"param_name": "mail",
"regex": ".+@.+"
}
}