Validation rules allow you to verify record values before submitting them to a database. If the values meet the condition criteria, a message will be displayed to the user—either near a specified column or at the top of the form. By creating validation rules, you can implement a range of restrictions, ranging from simple sanity checks, as depicted below, to complex conditions.
For instance, in the Finding Duplicate Entries template, a validation rule is created in the Companies table to prevent the creation of duplicates (companies with the same names).
Here’s another validation rule example that ensures the accuracy of End Date and Start Date. Let’s assume that in your business process, the End Date value should be greater than the Start Date value. To eliminate incorrect cases where
[End Date] <= [Start Date], you can create a validation rule to prevent inaccurate data entries.
To add a new Validation Rule:
Setuplink in the top right corner of the window.
Choose the necessary table and click the corresponding tab at the top of the window.
In the main frame menu, select
Newat the top of the actions list. The system will open the following form:
- Specify a condition that will trigger a certain action if met.
- Enter a message that should be shown if values mismatch the condition criteria.
- Select a record field where the message will be displayed.
- Leave this checkbox ticked to enable the created validation rule or uncheck it if you don’t want to activate it.
Please note that Validation Rules are low-level constraints and are applied not only to editing operations but also to imports and operations via the API.