Validation rules allow you to validate the data that is entered by the end - user. With this rule, you These rules can notify the users if some certain conditions are not valid and the user is trying met when they attempt to take an action, ensuring data accuracy and integrity.
Validation Group Name
Name This is the name of the validation group that attached to the the action.
Info |
---|
You |
...
may leave it empty to execute the validation |
...
at all times. |
Error Message
The error This message that will be shown to the user when the validation rule is validatedtriggered, helping users correct their input.
Rule Condition
The condition for the validation. If this condition is met, the error message will appear, and the form will not be validated.
Using Regular Expressions
You can also use Regular Expressions (RegEx) for validation. To set up a RegEx validation, use the match
function within the rule condition. This allows you to check if the input matches a specific pattern, ideal for validating formats such as email addresses, phone numbers, or other structured inputs.
Example
Code Block | ||
---|---|---|
| ||
return (!$Xml.Evaluate('.').match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi)) |
In this example, the match
function checks if current node
contains a valid email format. If it does not match, the error message will be shown, and the form will not be validatedsubmitted.