This guide separates validation requirements by the kind of mistake they prevent. Adapt each pattern to your data model and test the valid path as carefully as the blocked path.
Examples by business condition
- Stage-specific requirement: require a decision date only when a deal reaches a late stage; allow early discovery records to remain incomplete.
- Date order: prevent a service end date from occurring before the start date, while allowing both dates to be blank during intake.
- Cross-field agreement: require a delivery contact when shipping is selected, not on every record.
- Controlled exception: permit an audited bypass for a documented integration or emergency process, using a permission-based condition rather than a user ID.
Make the error actionable
Name the field and the correction the user should make. Put the message next to the field when possible. In a sandbox, test each record type, API/import path, and user permission set. A rule that blocks a legitimate integration may create a data backlog instead of improving quality.
Keep a rule register with purpose, owner, exception, and test evidence. Salesforce's official validation formula examples are syntax references; they do not replace testing against your org's policies.