Rule overview
This rule allows you to validate or block the checkout process based on defined conditions. You can show custom error messages or completely prevent checkout when certain criteria is met, such as invalid cart contents, restricted shipping regions, customer tags, or missing product attributes, etc. This helps enforce business rules, prevent unsupported orders, and guide customers to resolve issues before completing the checkout.Sample configuration
The following steps show how to create and configure a Validate/Block Checkout rule using the app.Create a new rule
From your Shopify admin, open the app. In the sidebar, go to the Rules section and click “Create Rule”. Then, You’ll be redirected to the Select checkout rule type screen. Choose category “Validation ” → select checkout rule type “Validate/Block Checkout” → click “Select Rule”.
Rule configuration
To configure the rule, first optionally we can add a name such as “Validate/block checkout” to describe what it does. Then, select the rule status: Testing, Active, or Deactivated. Here we are going to choose Testing status, so we can quickly test the rule without affecting the checkout for actual customers.
If you are unsure about what to choose for any rule settings, many times the
default preselected option is the best choice. You can always start with the
default option and modify it later.

As an example, here we are using the default Condition set 1, setting the rule to trigger when the “Address line 2 (Apartment, suite, etc)” field is empty, and configuring it to block checkout. The error message “Enter complete address” will be displayed under the Address line 2 field at the checkout, requiring customers to provide their complete address before proceeding.

- Under the General category, you can select “Top of the checkout page” to display the action at the very top.
- Under Below these Input fields, you can select to show the action below specific input fields, such as: Email, Customer phone number, Country, First name, Last name, Company, Address (Address line 1), Apartment, City, Province / state, Zip code / Postal code, Shipping phone number.

- Allow customer to complete checkout : This ensures that even if the app encounters an issue, the customer can still proceed with their purchase without interruption.
- Block customer from completing checkout: This will stop the customer from checking out if the app fails, potentially preventing transactions.


Test the rule
Since, the rule is set to testing status, we have to usetest@testing.com as the email, instead of the actual email, to run the rule at checkout.
The image below shows the checkout page before the testing email
address was used. Please note the error message is not yet displayed.

Please ensure to fill out all the required fields in the shipping address.
Shopify will only run the rule if all the required fields are filled out and
the customer is actually ready to checkout, to prevent running the rule on
every keystroke.

Activate the rule
Once testing is done, we can activate the rule, so it can start making changes to the checkout for actual customers. Only activated rules can make changes to the checkout for all customers. Click on Rules in the sidebar to view all rules. Select the rule you want to activate, then click the Activate button to activate it.Rule activation is only available on paid plans. If you haven’t upgraded your
plan yet, follow the instructions
here to upgrade.
