Checkout validation rules
A checkout validation rule checks the checkout before the customer pays. When the rule matches, Blockly either stops the order and shows an error, or shows a warning and lets the order go through.
Before you start
On Shopify Plus, validation rules run through the Checkout validation app block. Add it once by following Connect Blockly to your checkout. If the checkout editor asks, allow the block to block checkout progress. On other plans, validation rules run on Shopify Functions and there's nothing to add.
Create a validation rule
- Go to Checkout rules → Add a rule and pick Checkout Validation.
- Choose a template, or Custom validation rule to start from scratch.
- Enter a Rule name.
- Under When should this rule run?, set your conditions.
- Under Action, choose what happens (see below).
- Write the Error message or Warning message.
- Optional: add translations and, if you see Position, choose where the message appears.
- Pick a status in the Rule summary card and click Save in the save bar.

Templates
Templates fill in the condition for you.
| Group | Template | Starts with |
|---|---|---|
| Start from scratch | Custom validation rule | Customer email, Is |
| Start from scratch | Email address | Customer email, Is |
| Start from scratch | Order value | Cart total, Greater than |
| Customer identity | Phone number | Customer phone number, Is |
| Customer identity | Shipping name | Shipping name (First name), Is |
| Customer identity | Customer tag | Contains |
| Order behavior | Product tag | Contains |
| Order behavior | Order quantity | Cart quantity, Greater than |
| Order behavior | Products in cart | Product, Contains |
| Delivery & location | Shipping address | Address line 1, Is |
| Delivery & location | PO box address | Contains |
| Delivery & location | ZIP code | Is |
Choose the action
- Stop checkout and display an error message: "Customers can't place the order until they fix the issue."
- Display a warning but let checkout continue: "Customers see the message and can still place the order."
The message is required and can be up to 255 characters. Write it so the customer knows how to fix the problem, for example "We can't ship to PO boxes. Please enter a street address."

Translate the message
The Translation row (Optional) sits in the Action section. Click its button to open Translate the message. Pick a language in Choose a language, choose the Countries this applies to, enter the Translation and click Add language.
Translations are picked by the customer's country, not their browser language. A customer checking out from one of the countries you chose sees the translation. On Plus, the billing country is checked first.
Choose where the message appears
On stores that aren't on Shopify Plus, the Action section has a Position select. Choose Top of the checkout page, or a field from the Below a field group: Contact, Address line 1, Apartment, suite, etc., City, Company, Country, First name, Last name, Phone, Province / State or ZIP code.
Showing the message under the field the customer has to change makes it easier to fix. For example, use Address line 1 for a PO box rule.
On Shopify Plus, rules that run through the Checkout validation block show their message where you place that block in the checkout editor. The app shows "Choosing the message position is only available on Shopify Plus stores using the app block".
Conditions only on Shopify Plus
These condition groups are marked Requires Shopify Plus and only appear in validation rules on Plus stores.
- Billing address: billing address lines, name, city, province code, ZIP code, country, phone, company and Billing matches shipping.
- Number of discount codes & gift cards: Discount code, Discount amount and Gift card count.
Examples
Block PO box addresses
- Condition: PO Box address, Contains, values
PO Box,P.O. Box - Action: Stop checkout and display an error message
- Position: Below a field → Address line 1
Block disposable email addresses
- Condition: Customer email, Contains, values such as
@tempmail.com,@yopmail.com - Action: Stop checkout and display an error message
- Message: "Please use a permanent email address so we can send your order updates."
Limit quantity per order
- Condition: Cart quantity, Greater than,
10 - Action: Stop checkout and display an error message
- Message: "You can order up to 10 items per order."
Warn when the house number is missing
- Condition: No house number, then pick the countries to check, for example the countries where addresses always have a house number
- Action: Display a warning but let checkout continue
- Message: "Your address has no house number. Please check it before you pay."
Tips for picking conditions
- Always isn't available in validation rules. Every validation rule needs at least one real condition.
- Customer name uses the name on the customer's profile. To check what the customer typed at checkout, use Shipping name.
- Customer phone number uses the number typed in the Email or mobile phone number field. For the phone in the delivery address, use Delivery phone number.
- Shipping address conditions may not apply when the order doesn't need shipping.
- VAT number needs the Company name field turned on in your checkout settings.