What are the Validation Rules
Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”.
How to Create a Validation Rule
- From Setup, go to Object Manager and click Account.
- In the left sidebar, click Validation Rules.
- Click New.
- Enter the following properties for your validation rule:
- Rule Name: Account_Number_Length_Not_Equal_To_Eight
- Error Condition Formula
LEN( AccountNumber) != 8
- Error Message: Account number must be 8 characters long.
- To check your formula for errors, click Check Syntax.
- Click Save to finish

How many validation rules can be active in Salesforce?
- Professional: 20.
- Enterprise & Developer: 100.
- Unlimited & Performance: 500.
Why do we use Validation Rule in Salesforce?
Validation Rules in Salesforce verify that the data entered by a user meets certain criteria before the user can save the record.
Types of Operators Used in Validation Rule
Use these operators and functions when building formulas. All functions are available everywhere and you can include a formula like validation rules.
- Math Operators
- Logical Operators
- Text Operators
- Date and Time Functions
- Logical Functions
- Math Functions
- Text Functions
- Summary Functions
- Advanced Functions
Note: I am sharing with you the module link and some questions for practice so that you will be able to understand how the validation rules work and when it works. Please follow the module and Question and also please share the answer to the Question :
- Validation Rule Module
- 10 Validation Rule Questions
- Do not close opportunities in the past.
- A close reason is required when the opportunity is closed lost
- Customer PO Number Required for closed won
- The date of delivery must be no later than 14 days after the close date
- a custom field called Delivery Date should be provided if an opportunity has advanced to the Closed Won or Negotiation/Review stage.
- The opportunity Amount Should not be Blank in the prospecting stage.
- you want to prevent users from changing the “Case Origin” field after the Case has been created.
- Allows a custom field called Commit Amount to be increased but not decreased after initial creation.
- Prevents users from changing a custom field called Guaranteed Rate after it has been saved initially.
- Validates selected currency against an explicit subset of active currencies in your organization using the Currency Picklist
Please Share Answers after completing these Questions. I am very happy to see your answers in the comment box.