Validation Rules

Validation rules allow you to validate the data entered by the end user. These rules can notify users if certain conditions are not met when they attempt to take action, ensuring data accuracy and integrity.

Validation Group Name
This is the name of the validation group attached to the action.

You may leave it empty to execute the validation at all times.

Error Message
This message will be shown to the user when the validation rule is triggered, helping users correct their input.

Rule Condition
The condition for 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

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 submitted.

 

Copyright © 2010 - 2023 Emakin. All rights reserved.