Skip to content
Comply with the EU directives with Order EditingSee Shopify app listing

Validation Rules

Create free, instant address format checks that run as customers type.

6 min read

Overview

Validation rules are free, instant checks that run in the browser as customers type their shipping address. They catch formatting issues and common mistakes before the verifier runs, saving you money and giving customers immediate feedback.

Unlike verifiers (which check addresses against postal databases), validation rules run entirely in the browser with zero network requests. There's no waiting, no loading spinners, and no impact on checkout speed.

💡 Tip: Validation rules run before verifiers. If a rule catches a formatting issue, the customer fixes it first. Only then does the verifier check the corrected address against postal data. This means free rules handle the easy catches, and you only pay for verification on properly formatted addresses.

How it works

  1. A customer enters their shipping address at checkout.
  2. Your validation rules evaluate the address in real time as they type.
  3. If a rule triggers, the customer sees a message below the address fields.
  4. The customer fixes the issue.
  5. Once all rule issues are resolved, the verifier checks the address against postal data.

Creating a validation rule

  1. In the Order Editing app, go to Address Validation.
  2. Scroll down to Real-time Validation Rules and click Create validation.
  3. Enter a Name for internal reference (customers won't see this).
  4. Set the status to Active or Draft.
  5. Add one or more triggers (see below).
  6. Write a display message or click the generate button to have one written for you.
  7. Choose a message type (Informational, Warning, or Error).
  8. Click Save.

Available triggers

Triggers are the conditions that determine when your rule fires. You can combine multiple triggers in a single rule.

Trigger

What it detects

Example use case

Order Total

Checks the order value.

Show extra validation warnings for orders over $500.

Shipping Country

Targets specific shipping countries.

Show country-specific address instructions for Australia.

Missing House Number

Address line 1 doesn't include a street number.

Catch addresses like "Yorkshire Ave" that are missing a number.

Missing Street Name

Address appears to lack a proper street name.

Catch PO Box-only entries when you require a street address.

Zip Code Range

Targets specific postal code ranges.

Flag remote area postcodes that need special shipping handling.

Canadian Rural/Urban

Detects rural vs. urban Canadian addresses.

Show a note about longer delivery times for rural Canadian addresses.

US Military Address

Detects APO, FPO, and DPO addresses.

Show a message about military shipping restrictions or timelines.

Restricted States

Targets specific US states.

Block or warn about shipping to states you can't deliver to.

Field Contains Text

Searches for a specific phrase in an address field.

Detect "APO/FPO" or "c/o" entries in the address line.

Field Contains Special Characters

Finds unusual characters in address fields.

Catch potential typos or copy-paste errors with stray symbols.

Field Contains Non-Latin Characters

Detects characters outside the Latin alphabet.

Ensure carrier compatibility for labels that require Latin script.

Field Length

Checks the character count of an address field.

Flag addresses that are too short (likely incomplete) or too long for carrier labels.

Field Word Count

Checks the number of words in an address field.

Flag addresses with too few words (likely incomplete) or too many.

Field Matches Pattern

Checks whether a field matches a custom regex pattern.

Detect P.O. Box patterns or enforce specific address formats.

Shipping Method

Checks the selected shipping method.

Apply stricter validation for express or international shipping.

Trigger logic

When a rule has multiple triggers, you choose how they combine:

All triggers pass means every condition must be met before the rule fires. Use this for targeted rules. For example, "Shipping Country = Canada" AND "Missing House Number" will only trigger for Canadian addresses missing a house number.

Any trigger passes means the rule fires when at least one condition is met. Use this for broader rules that should catch multiple issues.

Message types

Each rule displays a message with one of three severity levels:

Type

Behaviour

Use for

Informational

Shows a message. Doesn't block checkout.

Helpful tips or optional suggestions.

Warning

Shows a message. Doesn't block checkout.

Important notices the customer should be aware of.

Error (Blocks Checkout)

Shows a message and prevents checkout until the issue is resolved.

Critical issues that must be fixed, like shipping to a restricted state.

⚠️ Warning: To use "Error (Blocks Checkout)", you must enable the "Allow app to block checkout" toggle in your Shopify checkout settings. Go to Settings > Checkout > Checkout customizations, find the OrderEditing app block, and enable the "Block checkout" checkbox.

Display messages

The display message is what your customer sees when a rule triggers. Write it to be clear, helpful, and specific to the issue.

You can write the message yourself or click the generate button (sparkle icon) to have one written automatically based on your trigger selection.

Messages are automatically translated at checkout based on the customer's language settings. You can also customise translations manually in the Translations settings.

Rule coverage estimation

After adding triggers, the Rule Coverage widget shows what percentage of your recent orders would have triggered this rule. It pulls from your last 30 days of order data.

Click the percentage to see the full list of Affected Orders, split into triggered and not triggered. This helps you confirm the rule targets the right orders before you publish it.

Some triggers (like "Field Contains Text" or "Field Contains Special Characters") can't be estimated from historical data. When this happens, the widget shows a Partial estimate badge and notes which triggers couldn't be analysed. The rule will still work correctly at checkout.

For more on testing, see Testing your Address Validation setup.

Frequently asked questions

Do validation rules slow down checkout?

No. Validation rules run entirely in the browser with zero network requests. Your customers see feedback immediately as they type, with no impact on checkout speed.

Do validation rules cost anything?

No. Validation rules are completely free, with no per-call charges. You can create and run as many rules as you need.

What's the difference between validation rules and verifiers?

Validation rules check address format (missing house number, restricted state, special characters). They're free and instant. Verifiers check whether the address actually exists by querying postal databases. They cost per validation but catch deliverability issues that format checks can't.

Can I control the order rules run in?

All active rules evaluate simultaneously as the customer types. If multiple rules trigger at once, all their messages display. There's no priority ordering between rules.

Related articles

Features & Configuration

Verification Conditions and Cost Control

Control when address verification runs to manage costs and target specific segments.

Features & Configuration

Customising Validation Messages and Translations

Rewrite and translate every customer-facing Address Validation message.

Features & Configuration

Post-Checkout Address Correction

How customers can fix their shipping address after checkout on the Thank You and Order Status pages.

Features & Configuration

Address Autocomplete

Set up Address Autocomplete to help customers enter shipping addresses faster, compare it with Google autocomplete, and use it with Address Validation.