---
title: Address Format Rules in Checkout Blocks
description: Use the Shopify Checkout Blocks app to create address format rules. Block PO boxes, require specific fields, and set character limits to reduce shipping errors.
canonical: https://tacey.app/blog/address-format-rules-in-checkout-blocks
published: 2026-11-02T15:57:47.771Z
updated: 2026-11-02T15:57:47.771Z
category: Apps & Tools
---
# Address Format Rules in Checkout Blocks

Learn how to use Shopify's Checkout Blocks to create address format rules that prevent shipping errors by validating addresses before a customer pays.

A single typo in a shipping address can cause a delayed shipment, a return-to-sender, and an unhappy customer. While many issues can be fixed after the fact, some merchants prefer to catch address problems before the order is even placed. Shopify's address format validation rules, part of the Checkout Blocks app, offer a way to do just that by checking the customer's shipping address before they can complete their payment.

A single returned package forces a merchant to pay for shipping multiple times: out to the customer, back to the sender, and out again with the corrected address. That's on top of the labor to process the return and the potential cost of replacing a lost or damaged product. For a small business, a handful of these errors each month can erase the profit from those sales.

These rules allow you to enforce a specific format for shipping addresses, such as blocking PO boxes or requiring a phone number. If a customer's entry doesn't match your rules, an error appears, and they must correct it to proceed. This is a powerful tool for preventing certain types of fulfillment problems before they start, but it's important to understand how it works and where it differs from validation that happens after the sale.

## What is an address format rule in Checkout Blocks?

An address format rule is a feature within Shopify's Checkout Blocks app that validates a customer's shipping address against criteria you set. If the address fails the check, the customer is prevented from completing the checkout process until they fix the issue. This happens live, during the checkout session, before any payment is taken.

These rules are designed to help merchants reduce fulfillment errors and support costs associated with incorrect addresses. For instance, if your carrier cannot deliver to PO boxes, you can create a rule to block those addresses outright. According to a [Shopify changelog post](https://changelog.shopify.com/posts/checkout-blocks-block-non-compliant-shipping-addresses-at-checkout?utm_source=tacey&utm_medium=blog&utm_campaign=address-format-rules-in-checkout-blocks), these rules are available to all merchants and apply across both online and agentic checkouts. This ensures a consistent standard for addresses, no matter how the customer is buying.

The core trade-off is simple: data purity versus sales friction. By enforcing rules at checkout, you get cleaner address data from the start. However, you are betting that the value of this clean data is greater than the value of the sales you might lose from customers who are blocked or frustrated by the rules.

This feature also applies to "agentic checkouts," a term for sales made through assistants or APIs. Imagine a customer service agent placing an order for a customer over the phone. The address rules apply here too, ensuring even manual orders meet your shipping standards and reducing human error.

It's a direct way to enforce your shipping policies at a critical moment. By stopping the order before it's placed, you avoid the downstream work of contacting a customer, correcting an address in your system, and potentially re-shipping an order. However, this also means you risk a customer abandoning their cart if they cannot provide an address that meets your rules.

## How do you create one?

Creating an address format rule happens within the Shopify admin through the Checkout Blocks app. The process involves defining the rule and then activating it. Once active, it will apply to all new checkouts. A [Shopify Help Center page](https://help.shopify.com/en/manual/checkout-settings/checkout-blocks/customizations/address-format-validation?utm_source=tacey&utm_medium=blog&utm_campaign=address-format-rules-in-checkout-blocks) provides a clear walkthrough of the process.

Here are the steps to create an address format validation rule:

- From your Shopify admin, navigate to **Settings > Checkout**.

- Scroll down to the **Checkout rules** section and click **Add Rule**. You will be prompted to select a rule from an installed app. If you have Checkout Blocks installed, you'll see its validation options.

- Alternatively, you can go directly to **Apps > Checkout Blocks**, click on the **Functions** tab, and then click **Create function**.

- In the **Validation** section, select **Address format validation**.

- Give your rule a descriptive title, like "Block PO Box Addresses" or "Require Phone Number."

- Configure one or more of the available validation rules, which are detailed in the next section. For each, you can select which address fields it applies to and customize the error message the customer will see.

- Once you've configured your rules, click **Save**. The rule is created but starts as **Inactive**. You must manually switch it to **Active** for it to take effect.

The ability to customize the error message is crucial. A clear message like, “We cannot ship to PO boxes, please provide a street address,” is much more helpful to a customer than a generic "Invalid address" error. This small detail can be the difference between a customer correcting their address and abandoning their purchase.

### A worked example: Blocking a known problem address

Let's say you've had fraud issues with orders shipping to a specific freight forwarder. The forwarder is at "123 Fake Street" but uses many different suite numbers. You can use a custom regex rule to block any address line containing "123 Fake Street", regardless of the suite number or recipient name.

Your regex pattern might look like this: `(?i)123\sFake\sStreet`. The `(?i)` makes the rule case-insensitive, so it catches "fake street" and "Fake Street". This is a precise tool. It stops a specific, known problem without accidentally blocking legitimate customers in the same zip code. It's a scalpel, not a sledgehammer.

Before you activate any rule, especially a complex regex, test it. Use a staff account or create a test customer profile. Try to place an order that should be blocked and one that should be allowed. This simple check can prevent you from accidentally blocking all checkouts and losing a day's sales.

## Which addresses and which rules does it cover?

Address format validation applies only to **shipping addresses**; a customer's billing address is not checked by these rules. This focus on the shipping destination is logical, as that is where fulfillment errors occur. Shopify provides a specific set of rules you can enable to build your validation logic.

The rules cover common shipping problems, from address types to character limits. According to [Shopify's documentation](https://help.shopify.com/en/manual/checkout-settings/checkout-blocks/customizations/address-format-validation?utm_source=tacey&utm_medium=blog&utm_campaign=address-format-rules-in-checkout-blocks), these are the primary validation rules available:

| Rule | Description |
| --- | --- |
| **Block specific address types** | Prevents checkout for addresses identified as PO boxes, military or diplomatic (APO/FPO/DPO), parcel lockers, and USPS gopost® locations. |
| **Block/Allow ZIP/postal codes** | Blocks or allows checkout only for specific postal codes. You can list multiple codes and use wildcards, like `902*` to cover a range. |
| **Character minimum/maximum** | Sets character limits for specific address fields. This can help catch incomplete entries, but be cautious with international addresses which can be long. |
| **Make optional fields required** | Forces the customer to fill out fields that are normally optional, such as 'Company' or 'Apartment, suite, etc.'. |
| **Custom regular expressions** | For advanced use cases, you can use regex to create your own complex validation patterns, such as blocking certain words or character formats. |

These tools give you significant control over the address data you collect. For example, a store that exclusively uses a courier that requires a recipient's phone number can make that field mandatory. Another that has issues with international shipping to certain regions could block those postal codes preemptively.

### Edge cases that can break your rules

The "Block specific address types" rule is powerful but not perfect. Some address validation services can misclassify addresses. A new apartment building with a concierge might be flagged as a business or parcel locker. This can lead to false positives, where you block a legitimate customer's home address by mistake.

When using wildcards for postal codes, be precise. `902*` seems like a good way to block a range of zip codes in Beverly Hills. But it would also block `9021`, if such a code existed elsewhere. A better approach is to list specific codes, or use a more targeted wildcard like `9021*` if you only want to affect that single area.

Character limits are especially risky for international sales. An address in Germany can easily exceed 35 characters on Address Line 1. For example, "Bürgermeister-Smidt-Straße 29" is a valid street in Bremen. Setting your character maximum too low will force international customers to abbreviate, which ironically increases the risk of delivery failure.

Requiring an "Apartment, suite, etc." entry seems smart for city dwellers, but it creates a problem for everyone else. Customers in single-family homes will be forced to enter something, leading to junk data like "N/A" or "house". This adds noise to your address data, defeating the purpose of validation.

## Can a rule be limited to certain markets?

Yes, you can apply an address format rule to specific markets instead of your entire customer base. By default, a new validation rule applies to all markets where you sell. However, the setup screen allows you to select one or more region-based markets for the rule to target.

This is particularly useful for international sellers whose shipping constraints vary by country. For example, you might need to block PO boxes for shipments to the United States but not for shipments within Canada. By creating a market-specific rule, you can enforce this without affecting customers in other regions.

This level of control introduces a new trade-off: granularity versus complexity. Managing a single global rule is simple. Managing ten different rules for ten different markets can become a significant operational burden. You must track why each rule exists and update it as your shipping partners or policies change.

For example, a skincare brand may find that couriers in the EU require a local phone number for delivery notifications. They can create a rule that makes the phone number mandatory, but only for their "European Union" market. A customer in the US, served by USPS, would not see this requirement.

To do this, when creating or editing your address format validation rule, you will see a "Markets" section. Here, you can click to add the specific markets you want the rule to apply to. If you leave this section untouched, the rule remains global. Note that Shopify's documentation specifies that only region markets are supported for this feature.

## What happens to a customer whose address breaks the rule?

When a customer enters a shipping address that violates an active format rule, they are not able to complete the checkout. Instead of proceeding to payment, an inline error message appears directly under the problematic address field. The checkout button remains disabled until the error is resolved.

The customer must go back to the shipping address form and correct the entry that triggered the rule. For example, if you've blocked PO boxes, and a customer enters "PO Box 123," the error message you configured will appear, and they will have to change it to a physical street address to continue.

This "hard gate" has a real conversion cost. Any friction during checkout gives a potential buyer a reason to reconsider their purchase. An unexpected error or an extra step breaks the flow, and a fraction of those buyers will abandon their cart instead of fixing the problem. A strict rule, therefore, can cost more in lost sales than it saves in shipping errors.

There is also a psychological cost. When a checkout form rejects a valid address, it can feel like an accusation. The customer knows their own address. A rigid error message can make them feel untrusted or that your store is difficult to deal with. This negative experience can sour their perception of your brand, even if they eventually complete the purchase.

This creates a hard gate at checkout. The sale is effectively blocked until the customer provides an address that meets your requirements. This approach places the full responsibility on the customer to fix the issue on the spot.

>
A sale is a commitment. You honor it by getting the order, then you work out the details. Blocking a checkout over a typo feels like punishing a customer for trying to pay you.

Odera Joseph Echendu, Founder, Tacey

## How is a checkout rule different from checking an address after the order is placed?

The key difference is the timing and the outcome. A checkout rule acts as a gatekeeper, blocking a sale *before* payment. An after-checkout address check validates the address *after* the order is already paid for and confirmed. This distinction has significant implications for both the customer experience and your risk of losing a sale.

### Preventative vs. Detective Controls

This highlights a classic business trade-off: preventative controls versus detective controls. A checkout rule is a preventative control; it stops the problem from happening before it occurs. It is rigid and proactive. Tacey is a detective control; it finds the problem after it has occurred but before it causes harm. It is flexible and focuses on recovery.

Consider the financial trade-off. A store will always have some percentage of orders with address errors. A pre-checkout rule blocks all of these sales before payment. A certain portion of those blocked customers will abandon their purchase out of frustration or inability to provide a different address. This represents a direct loss of revenue that the store would have otherwise captured.

A post-purchase tool, by contrast, flags these same problematic orders after the sale is secured. The system flags the order for review and gives the customer a chance to correct their own address on the order status page. For the rest, the customer can be contacted to provide a correction via an email link. While a small number of these orders may ultimately fail, the vast majority are recovered, preserving revenue that would have been lost at checkout.

Checkout rules, like those in Shopify's Checkout Blocks, prevent the order from being created. This is a preventative measure that stops a problem before it enters your fulfillment queue. The upside is a cleaner order list. The downside is the potential for cart abandonment if a legitimate customer is blocked by a strict rule or is unable to provide an alternate address.

In contrast, post-purchase validation tools like Tacey work on a different philosophy. Tacey checks every shipping address the moment an order is placed, after payment is complete. If it detects a potential issue, it doesn't block the sale. Instead, it tags the order in your Shopify admin for review. This allows you to secure the conversion first and then resolve any address issues before the order ships.

Ultimately, the choice depends on your business priorities. If preventing certain address types is non-negotiable and worth potentially losing a sale, Shopify's checkout rules are a direct solution. If your priority is to maximize conversions and handle exceptions gracefully after the fact, a post-purchase solution for [address validation](/address-validation) offers a more flexible alternative.

Many merchants find that a combination of light rules at checkout and a validation step after purchase provides the best balance. This layered approach protects conversions while still catching errors before they become costly fulfillment mistakes. You can learn more and try Tacey from the [Shopify App Store](https://apps.shopify.com/tacey?utm_source=tacey&utm_medium=blog&utm_campaign=address-format-rules-in-checkout-blocks).

## Frequently asked questions

### Do address format rules work for billing addresses?

No, the address format validation rules in Checkout Blocks only apply to shipping addresses. Billing addresses are not checked or validated by this feature.

### Will this block military or diplomatic addresses?

Yes, the "Block specific address types" rule allows you to block checkout for addresses identified as military or diplomatic (such as APO, FPO, and DPO addresses). You can enable this to prevent orders you cannot fulfill to these locations.

### Is the Checkout Blocks app free?

Some features of the Checkout Blocks app are available on all Shopify plans, but many advanced capabilities, including address format validation, have historically been limited to Shopify Plus merchants. However, Shopify has announced that address format validation is now available to all merchants.

### Can I use regex for any address field?

Yes, the custom rule option supports regular expressions (regex) that can be applied to any shipping address field. This allows for highly specific and customized validation logic if the standard rules don't meet your needs.

### What happens if I set a character limit that's too low?

Setting a character limit that is too restrictive can block customers with valid, but long, addresses. This is especially common with international addresses. It is important to set realistic limits to avoid creating unnecessary friction for legitimate customers.

### What happens if I set up conflicting rules?

It is possible to create rules that conflict, for example, by allowing a specific postal code in one rule and blocking it in another. Shopify's system will evaluate the rules, but the outcome can be unpredictable. It is best to test your rule combinations carefully to ensure they work as intended and don't create a frustrating loop for the customer.
