Validation Rules Examples in Salesforce

Here is the link to a cheat sheet for some useful validation rules that you can incorporate in Salesforce.com.

Salesforce Validation Rule Examples

Some of the validation rules that I found useful are

  • Postal code is in correct format if the country is Canada or US
  • State is valid if the country is Canada or US
  • Country is a valid 2 letter ISO code
  • Number entered is even or odd number
  • Number entered is a multiple of another number
  • Phone number is in (999) 999-9999 format
  • Date entered is a weekday or weekend
  • Date entered is the last day of the month
  • Conditionally require a field based on the value of other field
  • Only the record owner can make changes to a particular field
  • Cross object validation rules

References & Useful URLs

13 thoughts on “Validation Rules Examples in Salesforce”

  1. If the first dose is below December 18, 2020 throw below error.Error Message – The first vaccine was available on December 18, 2020. Choose date after December 18, 2020.
    2) If the final dose date is below December 18, 2020 throw below error.Error Message – The first vaccine was available on December 18, 2020. Choose date after December 18, 2020.
    3) Booster #2 date can not be the same or less than Booster #1 date.
    4) Booster #1 date can not be the same or less than Date of final dose.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass