Validating if US zip codes are well-formed using a validation rule with REGEX
Accurate information and reports are vital in an effective Salesforce CRM system and without them, users and sales management cannot make informed decisions. One way to achieve accurate information for reporting is by ensuring that data is stored in a consistent manner.
In this recipe, we will create a validation rule to ensure that US zip codes conform to the correct format.
How to do it...
Carry out the following steps to create a validation rule to validate US zip codes that are well-formed on an account record:
- Click on the Setup gear icon in the top right-hand corner of the main Home page, as shown in the following screenshot:
- Click on
Setup
, as shown in the following screenshot:
- Navigate to the Account Validations Rule setup page by clicking the following:
Objects and Fields
|Object Manager
|Account
|Validation Rules
.
Locate the Validation Rules
section on the right of the page.
- Click on
New
.
You will be presented...