# Data integrity: validation rules, required fields and duplicates

*Platform Foundations Study Guide · Data Model · Last updated October 16, 2026 · https://www.certifyforce.com/study-guide/platform-foundations/data-model/data-integrity-validation-rules-required-fields-and-duplicates*

Which tool keeps bad data out of Salesforce: required fields for values every record needs, validation rules for formats and conditions, picklists (restricted and dependent) and record types for consistent choices, and matching and duplicate rules plus merging for duplicates.

- Certification: Salesforce Platform Foundations
- Exam section: Data Model
- Study guide: https://www.certifyforce.com/study-guide/platform-foundations

**Official exam objective:**

> Given a scenario, determine which tool to use to ensure data integrity.

## What the exam expects

- Choose a required field when every record must have a value, and a validation rule when the value must follow a format or a condition.
- Predict what a user sees when a validation rule's formula returns True.
- Replace free text with a picklist, and pick a restricted or dependent picklist from the requirement.
- Use record types when different groups need different picklist values and page layouts.
- Name the two parts of duplicate management, the actions a duplicate rule can take, and how to fix duplicates that already exist.

Key terms:
- **Validation rule:** a formula that returns True when data is invalid and shows an error instead of saving.
- **Required field:** a field users must fill in before they can save.
- **Restricted picklist:** a picklist that accepts only its defined values, even from the API.
- **Matching rule:** how records are compared to find duplicates.
- **Duplicate rule:** what happens when a user starts creating a duplicate.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Validation rule result | True means invalid: the error message shows and the record isn't saved | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&language=en_US&type=5) |
| Error message location | Near a field or at the top of the page | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&language=en_US&type=5) |
| Fields not on the layout | Validation rules still apply to new and updated records | [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&language=en_US&type=5) |
| Where to create a validation rule | Setup, Object Manager, the object's Validation Rules | [Create Validation Rules](https://trailhead.salesforce.com/content/learn/modules/point_click_business_logic/validation_rules) |
| Required by condition | A validation rule can check whether a field is blank | [Improve Data Quality](https://trailhead.salesforce.com/content/learn/modules/data_quality/data_quality_improve_quality) |
| Unrestricted picklist | Blocks new values in the UI but not via the API, automation or apps | [Get Started with Picklists](https://trailhead.salesforce.com/content/learn/modules/picklist_admin/picklist_admin_start) |
| Dependent picklist | Filtered by a controlling picklist or checkbox on the same record | [Get Started with Picklists](https://trailhead.salesforce.com/content/learn/modules/picklist_admin/picklist_admin_start) |
| Record types | Different business processes, picklist values and page layouts per user group | [Tailor Business Processes to Different Record Types Users](https://help.salesforce.com/s/articleView?language=en_US&id=platform.customize_recordtype.htm&type=5) |
| Duplicate detection | Matching rules identify; duplicate rules decide what happens | [Manage Duplicate Records](https://help.salesforce.com/s/articleView?id=sales.managing_duplicates_overview.htm&language=en_US&type=5) |
| Default duplicate rule actions | Alert the user and report on duplicates created | [Customize Duplicate Rules](https://help.salesforce.com/s/articleView?id=sales.duplicate_rules_create.htm&type=5) |
| Existing duplicates | Merge duplicate leads, accounts and contacts | [Manage Duplicate Records](https://help.salesforce.com/s/articleView?id=sales.managing_duplicates_overview.htm&language=en_US&type=5) |

## Check yourself

- Why use a validation rule instead of a required field for a value needed only under a certain condition?
- When should a picklist be restricted?
- Which two components work together to find and handle duplicate records?
- What does a user see when a validation rule fails?

## Sources

- [Improve Data Quality](https://trailhead.salesforce.com/content/learn/modules/data_quality/data_quality_improve_quality)
- [Create Validation Rules](https://trailhead.salesforce.com/content/learn/modules/point_click_business_logic/validation_rules)
- [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&language=en_US&type=5)
- [Manage Duplicate Records](https://help.salesforce.com/s/articleView?id=sales.managing_duplicates_overview.htm&language=en_US&type=5)
- [Customize Duplicate Rules](https://help.salesforce.com/s/articleView?id=sales.duplicate_rules_create.htm&type=5)
- [Get Started with Picklists](https://trailhead.salesforce.com/content/learn/modules/picklist_admin/picklist_admin_start)
- [Tailor Business Processes to Different Record Types Users](https://help.salesforce.com/s/articleView?language=en_US&id=platform.customize_recordtype.htm&type=5)
- [Optimize Customer Data with Standard and Custom Objects](https://trailhead.salesforce.com/content/learn/modules/data_modeling/objects_intro)

## About the full unit

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