New: Blockly Checkout Customizer is live — checkout rules, upsells & checkout analytics.Install free
HomeHelp CenterCheckout CustomizerCheckout validation rules

Checkout validation rules

Blockly Checkout Customizer Updated November 24, 2026

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

  1. Go to Checkout rules → Add a rule and pick Checkout Validation.
  2. Choose a template, or Custom validation rule to start from scratch.
  3. Enter a Rule name.
  4. Under When should this rule run?, set your conditions.
  5. Under Action, choose what happens (see below).
  6. Write the Error message or Warning message.
  7. Optional: add translations and, if you see Position, choose where the message appears.
  8. Pick a status in the Rule summary card and click Save in the save bar.
Checkout validation rule editor with condition, action and error message
The validation rule editor. The Preview on the right shows the message at checkout.

Templates

Templates fill in the condition for you.

GroupTemplateStarts with
Start from scratchCustom validation ruleCustomer email, Is
Start from scratchEmail addressCustomer email, Is
Start from scratchOrder valueCart total, Greater than
Customer identityPhone numberCustomer phone number, Is
Customer identityShipping nameShipping name (First name), Is
Customer identityCustomer tagContains
Order behaviorProduct tagContains
Order behaviorOrder quantityCart quantity, Greater than
Order behaviorProducts in cartProduct, Contains
Delivery & locationShipping addressAddress line 1, Is
Delivery & locationPO box addressContains
Delivery & locationZIP codeIs

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."

Action cards, error message, translation and message position
Pick the action and write the message (marker 1), then choose the Position (marker 2).

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.

Important

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.

Important

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

Important

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.