Use the Zip code condition as a Shopify ZIP code validator for shipping addresses. You can match a list of exact postal codes, check whether a code contains listed text, or use * to cover a range of codes.
Choose how to match your list
Select Zip code from Shipping address, then choose an operator. For either list operator, enter one value per line.
| Operator | What it matches | Example |
| ------------------- | --------------------------------------------------------------------- | ---------------------------------------------- |
| is one of | A whole ZIP or postal code matching any line. A line can contain *. | 90210 matches 90210, but not 90210-1234. |
| contains one of | A ZIP or postal code containing the text on any line. | 90210 matches 90210-1234 and 190210. |
For example, enter 90210 and 10001 on separate lines to check either code. Comparisons ignore letter case and spaces at the start or end of each entry.

Match a range with *
With is one of, * stands for any number of characters. Use 90* to match codes that start with 90, including 90210. Use K1A* to match postal codes such as K1A 0B1 and K1A0B1. You can mix exact codes and wildcard patterns, one per line.
Spaces inside a code count as characters, and customers don't always type them. For Canadian and UK codes, put * straight after the first part: K1A* matches with or without the space, but K1A * only matches when the customer types the space.
The pattern must still match the whole code. 90* does not match X90210. With contains one of, * is treated as a normal character, so use that operator for text fragments instead.

Good to know
The Zip code condition is available with Standard input, Attribute input, and Customer input. It checks the shipping address, so it cannot match when that address or its postal code is missing. If there are multiple shipping addresses, a match on any one of them meets the condition.
You can combine Zip code with a cart condition to restrict products by ZIP code. For a complete rule and customer message, see Restrict products or collections by location. To block all orders to selected codes, see Block orders to specific ZIP codes or countries.
