SF Learners Hub


Validation Rule in Salesforce

Share This Post

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?

  1. Professional: 20. 
  2. Enterprise & Developer: 100. 
  3. 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.

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
    1. Do not close opportunities in the past.
    2. A close reason is required when the opportunity is closed lost
    3. Customer PO Number Required for closed won
    4. The date of delivery must be no later than 14 days after the close date
    5. a custom field called Delivery Date should be provided if an opportunity has advanced to the Closed Won or Negotiation/Review stage.
    6. The opportunity Amount Should not be Blank in the prospecting stage.
    7. you want to prevent users from changing the “Case Origin” field after the Case has been created.
    8. Allows a custom field called Commit Amount to be increased but not decreased after initial creation.
    9. Prevents users from changing a custom field called Guaranteed Rate after it has been saved initially.
    10. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

The Power of Salesforce Integration

What You’ll Learn What Is Salesforce Integration? Salesforce integration involves combining the data and features of Salesforce with another application, creating a cohesive experience for