# Validation rule formulas and when rules run

*Platform App Builder Study Guide · Business Logic and Process Automation · Last updated October 25, 2026 · https://www.certifyforce.com/study-guide/platform-app-builder/business-logic-and-process-automation/validation-rule-formulas-and-when-rules-run*

How to write validation rule error conditions that return TRUE for bad data, the ISNEW, ISCHANGED, PRIORVALUE, ISBLANK and ISPICKVAL patterns, parent fields and roll-up counts in rules, and where rules run (API, Web-to-Case) and don't (Quick Create, Mass Transfer).

- Certification: Salesforce Platform App Builder
- Exam section: Business Logic and Process Automation
- Study guide: https://www.certifyforce.com/study-guide/platform-app-builder

**Official exam objective:**

> Given a scenario, demonstrate the use of validation rules to meet stated business requirements.

## What the exam expects

- Write an error condition formula that returns TRUE for the invalid state, combining ISBLANK, ISPICKVAL and AND/OR correctly.
- Limit a rule to new records (ISNEW), to changes (ISCHANGED) or to moves away from a value (PRIORVALUE).
- Reference parent fields and roll-up summary counts in a rule, and place the error message.
- Predict when rules run (edits, API, imports, Web-to-Case) and when they don't (Quick Create, Mass Transfer).
- Choose a validation rule, a lookup filter or another tool for a data-quality requirement.

Key terms: **error condition formula**, the rule's formula, TRUE meaning the data is invalid; **error location**, where the message shows (top of page or next to a field); **ISNEW**, TRUE while a record is being created; **ISCHANGED**, TRUE when a field differs from its previous value; **PRIORVALUE**, the field's value before the edit.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| TRUE blocks the save | Error message shows when the formula returns True | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm) |
| All failing rules shown | Salesforce checks every rule and displays all errors at once | [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&type=5) |
| Layout and API independent | Rules apply even if fields aren't on the layout or in the API call | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm) |
| Quick Create | Validation rules don't apply | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm) |
| Mass Transfer | Rules don't run on transferred records | [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&type=5) |
| Web-to-Case and Web-to-Lead | Rules run first; only valid records are created | [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&type=5) |
| ISCHANGED on new records | Always FALSE | [ISCHANGED](https://help.salesforce.com/s/articleView?language=en_US&id=platform.customize_functions_ischanged.htm&type=5) |
| PRIORVALUE on new records | Returns the current value, not null | [PRIORVALUE](https://help.salesforce.com/s/articleView?id=platform.customize_functions_priorvalue.htm&type=5) |
| Roll-up fields in rules | Allowed; not as the error location | [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&type=5) |

## Check yourself

- Why does choosing a field as the error location not change when the rule fires?
- When are validation rules enforced during lead conversion?
- What does ISNEW return while an existing record is edited, and what does that do to an AND(ISNEW(), ...) rule?
- Why can a record hold a value that breaks an active validation rule?

## Sources

- [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm)
- [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&type=5)
- [Sample Call Center Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_useful_validation_formulas_callcenter.htm&language=en_US&type=5)
- [Define Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_defining_field_validation_rules.htm&type=5)
- [ISCHANGED](https://help.salesforce.com/s/articleView?language=en_US&id=platform.customize_functions_ischanged.htm&type=5)
- [ISNEW](https://help.salesforce.com/s/articleView?id=platform.customize_functions_isnew.htm&type=5)
- [PRIORVALUE](https://help.salesforce.com/s/articleView?id=platform.customize_functions_priorvalue.htm&type=5)
- [Tips for Working with Picklist and Multi-Select Picklist Values in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_picklist_formula_fields.htm&type=5)
- [Roll-Up Summary Field](https://help.salesforce.com/s/articleView?id=platform.fields_about_roll_up_summary_fields.htm&type=5)
- [Error: maximum number of 15 object references](https://help.salesforce.com/s/articleView?id=000383053&language=en_US&type=1)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 10 linked practice questions, and unlimited timed mock exams are included with the Platform App Builder pack (USD $19): https://www.certifyforce.com/practice-exams
