A validation rule is a powerful feature used to enforce data quality and consistency by defining specific criteria that must be met before a record is saved or updated. If the criteria specified in the validation rule are not met, will prevent the record from being saved or updated, displaying an error message to the user.
-
1.
open Home | Salesforce
-
2.
Click the gear icon and select Set up from dropdown
-
3.
Click Object Manager
-
4.
On Quick find box type the object name on which one wants to create a validation rule and click on next
-
5.
Click on the object
-
6.
Click Validation Rules
-
7.
Click New Validation Rule
-
8.
Click on Rule Name and give a name to the rule and click on next
-
9.
Click on the formula condition box; this is where one has to write the formula and the operation will run here ; click on next
-
10.
one must choose the required functions for the formula from the Function section and then click on next
-
11.
Once the required operator is selected ,click Insert Selected Function and then click on next
-
12.
Once the formula is written, click on Check Syntax to validate the formula
-
13.
Click on Error Message and enter the error message that should be displayed and then click on next
-
14.
Click Save