A useful validation rule should stop bad data and help the person saving the record correct it. Too often, users instead meet a vague message, cannot see the field involved or discover that an unrelated edit has activated an old requirement.

Salesforce validation rules evaluate a formula when a record is saved. If the formula returns true, the save is blocked and the configured error message appears. They can protect data across page layouts and API updates, which makes them powerful—but also means a small formula can affect users, automation and integrations far beyond one screen.

The platform behaviour below comes from current Salesforce Help and Trailhead guidance. The review order and operating recommendations are the Ostrelis view. Start with the rules that generate the most support questions rather than attempting to rewrite every rule at once.

1. Ask for data when the process actually needs it

For admins and managers: do not make a field mandatory at record creation simply because it will be useful later. A qualification reason may be essential before an opportunity advances, but impossible to know when the record is first opened. Asking too early encourages placeholders such as “TBC”, which satisfy the rule without improving the data.

Define the business event that makes the value necessary: a stage change, a status, approval submission or another meaningful transition. Then write the rule around that point. If the information is always required, consider whether a field-level requirement is clearer; if it is conditional, a validation rule may be appropriate.

Quick action: take one frequently triggered rule and complete the sentence “This value becomes necessary when...”. If the answer is unclear, the requirement needs work before the formula does.

2. Write the error message as the next instruction

For admins: Salesforce recommends telling users what kind of entry is valid and including the field label, particularly when the message appears at the top of the page. “Invalid value” describes the outcome, not the correction. “Enter a Close Date on or after today” is specific and actionable.

Place the message beside an editable field when that field is the obvious fix. Salesforce notes that a field-level message moves to the top of the page if its target is later deleted, read-only or absent from the layout. Test every relevant layout, including the experience of users who cannot edit all fields referenced by the rule.

For users: if a message does not tell you what to change, record the message, object and action that triggered it. That is more useful to support than repeated screenshots of the whole page.

Quick action: rewrite one vague message using “action + field + accepted condition”.

3. Keep one rule tied to one business requirement

For admins: a single long formula can enforce several checks, but the resulting error often leaves users guessing which condition failed. Focus each rule on one requirement where practical. Give it a stable identifier such as OPP014, include that identifier in the description and error message, and explain the business reason in the description.

Salesforce recommends numbering corresponding rules and messages so the source can be identified. A searchable identifier helps a support colleague find the exact rule without reproducing every branch of a complex formula. It also makes release notes and test evidence easier to connect.

Quick action: add an identifier and plain-English purpose to the three rules that create the most tickets.

4. Fire the rule only when the relevant change happens

For admins: Salesforce highlights ISNEW(), ISCHANGED() and PRIORVALUE() as useful ways to target rules. Without change-aware conditions, a user updating a phone number might be blocked because a different field contains historical data that no longer meets today’s standard.

That does not mean every existing record should be exempt forever. Decide deliberately whether the rule should govern new records, changes to a particular field, movement between stages or every save. Where legacy data must be corrected, plan the cleanup and ownership rather than turning unrelated edits into surprise remediation work.

Quick action: review whether each high-volume rule is intended to fire on create, on a relevant change or on every save, then test all three scenarios.

5. Test every route that can save the record

For admins and developers: Salesforce warns that validation rules apply to new and updated records even when referenced fields are not present in a page layout or API call. Before activation, test standard pages, Dynamic Forms or other assigned layouts, mobile use, Flow, imports and important integrations that write to the object.

Use representative users, not only a system administrator. Check hidden and read-only fields, record types and conflicting rules. Salesforce notes that multiple failed rules can display their messages together, so test combinations as well as each rule in isolation. Include a valid path, expected failures and boundary values.

Quick action: attach a short save-path checklist to the change record and name the owner of every integration included in testing.

6. Make legitimate exceptions explicit and controlled

For admins: some processes need a genuine exception—for example, a controlled data migration or a correction by a specialist team. Do not hide that exception in a username, profile name or temporary formula edit. Salesforce Trailhead demonstrates using a custom permission, assigned through a permission set, and checking $Permission in the validation rule.

A bypass should be narrow, documented and reviewed. Decide who can assign it, whether it should be session-based, what work justifies its use and how the resulting data is checked. Integrations should not receive a blanket bypass simply because a test failed; first confirm whether the rule or the integration payload is wrong.

Quick action: inventory current bypass conditions and replace person-specific exceptions with a governed permission where the exception remains valid.

7. Treat validation rules as maintained controls

For managers and admins: a rule can outlive the policy, field or team that created it. Give important rules a business owner, technical owner, purpose, related process and review date. Record whether the rule protects reporting, compliance, routing or another operational need.

Use support cases, failed automation and integration logs to spot rules that cause recurring friction. Review inactive rules as well as active ones: an unexplained inactive rule is not documentation. Retire obsolete controls through the normal change process and preserve evidence where the rule supports a formal requirement.

Quick action: export or list the rules on one busy object and mark each as keep, improve, investigate or retire.

Improve the rule users notice most

Good validation is precise: it asks for the right information at the right moment, explains the correction and behaves consistently across every save path. That improves data without making routine work harder than it needs to be.

Choose one rule that users regularly mention. Confirm its purpose with the process owner, test it with a representative user and make the smallest safe improvement. Then apply the same review pattern to the rest of the object.

For a deeper formula walkthrough, see the free Ostrelis guide to Salesforce validation rules. Ostrelis can also help with Salesforce administration, ongoing managed services and a focused Salesforce health check.

Need help getting prepared?

Ostrelis can help assess whether this change affects your Salesforce environment, identify dependencies and plan the work needed to prepare safely.

Talk to a Salesforce expert

Sources

  1. Validation Rules — Salesforce Help (Current Salesforce Help guidance, accessed 22 October 2026)
  2. Tips for Writing Validation Rules — Salesforce Help (Current Salesforce Help guidance, accessed 22 October 2026)
  3. Validation Rule Considerations — Salesforce Help (Current Salesforce Help guidance, accessed 22 October 2026)
  4. Optimize Validation Rules for Salesforce — Salesforce Trailhead (Current Salesforce Trailhead guidance, accessed 22 October 2026)
  5. Improve Data Quality with Lead Validation — Salesforce Trailhead (Current Salesforce Trailhead guidance, accessed 22 October 2026)