Skip to main content

How do I validate based on custom REGEX with Address Ninja?

Address Ninja

Written by John Speed

Open Address Ninja from Apps in your Shopify admin. On the home page, click Custom rule (REGEX). In the What to block card, enter a regular expression in the Regex field, or click Presets and choose a ready-made pattern such as Block numbers or Require a value. Type a sample in the Check your regex field to see if the pattern blocks it. Select the fields the pattern applies to. Under Countries, choose All countries, Only these countries, or Except these countries. Under Address, choose Shipping address, Billing address, or Shipping and billing addresses. To add a pattern for other fields, countries, or addresses, click Add another pattern. Click Save and turn on.

Customers whose entry matches the pattern see your error message. To change it, open the Error message card. Contact us if you need help writing the pattern. This rule is included in the Pro plan.

Did this answer your question?