Agentic demo automation is here.
Meet Lily
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free

How to Create a Validation Rule in Salesforce

‍

Validation rules act as roadblocks to ensure data accuracy in Salesforce. Here's how to create one:

  1. Go to Setup on the top right.
  2. Search for Object Manager in the Quick Find.
  3. Select the object you want to enforce the rule on (Leads, Opportunities etc).
  4. Find the Validation Rules section and click on it.
  5. Click New to initiate the creation of a new validation rule.
  6. Define the Rule:
    • Label: Give your rule a clear name (e.g., "Opportunity Requires Amount").
    • Select "Active" to make the rule enforceable.
    • Error Condition Formula: This is the key part. Use the formula builder to define the criteria that must be met to avoid an error message.
    • Example Formula: ISPICKVAL(PRIORVALUE(StageName), "Closed Won") && Amount == null (Ensures amount is filled for opportunities marked as "Closed Won").
    • Error Message: Craft a clear message displayed to users when the validation fails (e.g., "Please enter an amount for Closed Won opportunities").
  7. Click Save to create the validation rule.
Similar Articles

How To Deploy Automation Sequences In Salesforce

How To Organize Product Categories In Salesforce

How To Create Action Buttons In Salesforce

Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Build Killer Demos in 2 Minutes
Chrome Extension Icon
Try our Chrome extension
DOWNLOAD

Desktop app for macOS
DOWNLOAD
Backed by
Y combinator
AICPA SOC
GDPR
Products
Guided DemosSandbox DemosDemo Hub
Featured
Account RevealPersonalizationIntegrations
Solutions
EnterpriseGrowth & Demand
MarketingProduct MarketingSalesPresales
Resources
BlogTutorialsHelp DocsWhat’s NewDemo DundiesPlaybooks
Company
CareersPricingPartnersContactTrust CenterDemo Abuse
Customers
Demo ShowcaseCase Studies
Built in San Francisco Bay Area - ©2025 Storylane
Backed by
Y combinator
AICPA SOC
GDPR
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it