function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfadm sfadmsfadm sfadm 

Billing Zip/Postal Code validation

I need a validation in the Biliing Post Code code field to prevent users from typing and entering City and Coutry into the Post Code field the way it is displayed in the followng image
User-added image
Please advise how such validation can be achieved?
Best Answer chosen by sfadm sfadm
James LoghryJames Loghry
Hi sfadm,

Take a look at this document which contains validation rules for postal codes:

Too long didn't read version: You can go as simple as checking the formatting of the postal code field, or as crazy as creating and validating against a custom setting that contains all the zip codes for US states and territories.

When you create the validation rule, you'll want to set the error message on the field level.  If you're unfamiliar with validation rules, be sure to check out the following Trailhead module:

- James