-
-
Notifications
You must be signed in to change notification settings - Fork 1
3.4.2. Regex
Ettiene Mare edited this page Mar 11, 2020
·
4 revisions
This validator will validate the control value against a regular expression.
This validator will validate the control value against a regular expression.
The validator should be registered in the validator service.
export class ValidatorService {
private validators: Array<Validator> = [
new RegexValidator("regex")
];
}
The validator will be linked to the control in the process definition file.
{
"name" : "my-process",
"activities": [
{
"name": "start",
"type": "page-activity",
"controls": [
{
"tag": "input",
"id": "user.firstName",
"validators": [
{
"name": "regex",
"message": "Enter a valid name",
"expression": "^[A-Z][a-z]*$"
}
]
},
]
}
]
}
Property | Description |
---|---|
name | The type of the validator, it should be regex for the required validator. |
message | The error message to be displayed. |
expression | The expression to use for the validation. |
-
3.1.Introduction
3.2. Core
3.3. Services
3.3.1. Workflow
3.3.2. Analytics
3.3.3. Config
3.3.4. Model
3.3.5. Validator
3.3.6. Http3.4. Validators
3.5. Pipes
3.5.1. Currency
3.6. Activities
3.6.1. Page
3.6.2. Api
3.6.3. Assign
3.6.4. Decision
3.6.5. Code
3.6.6. IPC
3.6.7. Finish
3.6.8. Redirect
3.6.9. Switch
3.6.10. Custom3.7. Web Components
3.7.1. React