---
schema_version: "1"
id: 918ac342f966a60950632d57adae6158292e288ac6dba55b414230cc26d6b2f6
title: Define Validation Rules
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/fields_defining_field_validation_rules.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.fields_defining_field_validation_rules.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 489e170d2741614f6848b56646f6b6d057b6e31ad413c45a13a6236f2aa0c508
description: Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Define Validation Rules

Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Contact Manager</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Database.com</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d196532e89">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d196532e89 ">To view field validation rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d196532e89 ">View Setup and Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d196532e89 ">To define or change field validation rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d196532e89 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

Before creating validation rules, review the [Validation Rule Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_validation_considerations.htm&release=264.0.0&type=5 "Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value. Review these considerations before implementing validation rules in your organization.").

1. From the management settings for the relevant object, go to Validation Rules.
2. In the Validation Rules related list, click **New**.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note The detail page of a custom activity field does not list associated validation rules. To edit the validation rule for a custom activity field, select the validation rule from Setup by entering Activities in the Quick Find box, then selecting **Activities** and choose **Task Validation Rules** or **Event Validation Rules**.
3. Enter the [properties of your validation rule](https://help.salesforce.com/s/articleView?id=platform.fields_validation_rules_fields.htm&release=264.0.0&type=5 "A list of fields and description for validation rules.").
4. To check your formula for errors, click **Check Syntax**.

#### See Also

- [Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&release=264.0.0&type=5 "Improve the quality of your data using validation rules. Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record.")
- [Clone Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_cloning_field_validation_rules.htm&release=264.0.0&type=5 "Create new validation rules quickly by using existing rules as your starting point.")
- [Tips for Writing Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_validation_rules_tips.htm&release=264.0.0&type=5 "Keep these tips in mind when writing validation rules.")
- [Examples of Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_useful_field_validation_formulas.htm&release=264.0.0&type=5 "Review examples of validation rules for various types of apps that you can use and modify for your own purposes. Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record.")