On this page
What this issue is
A postal code (called a ZIP code in the US, a postcode in the UK) is the short code that identifies a delivery area. Formats differ a lot by country. The US uses 5 digits. The UK uses letters and digits with a space. Canada alternates letters and digits. Ireland uses a 7-character Eircode. Some countries, such as Hong Kong, have no postal codes at all.
| Country | Example | Format |
|---|---|---|
| United States | 90210 or 90210-1234 | 5 digits, optional 4 |
| United Kingdom | SW1A 1AA | Letters and digits, 5-7 characters plus a space |
| Canada | K1A 0B1 | Letter-digit-letter, space, digit-letter-digit |
| Netherlands | 1012 AB | 4 digits, 2 letters |
| Ireland | D02 X285 | 3 characters, space, 4 characters |
| Germany | 10115 | 5 digits |
| Hong Kong | (none) | No postal code system |
Why it costs you leads or sales
The error appears at the very end of the form or checkout, when the visitor is ready to buy or book. They typed a correct code and are told it is wrong. Most will not try tricks like entering a fake US ZIP. They leave, and you never see the lost sale because no order or lead is created.
- Product pageVisitor from Canada adds item
- CartProceeds to checkout
- Address formK1A 0B1 rejected as invalid
- PaymentNever reached
- Order confirmationNever reached
The postal code rule blocks the shipping step, so everything after it is lost.
Example: illustrative completion rates for visitors who reach the address step. Your own numbers will differ.
How to check if your site has it
List the countries you sell or serve
Check your shipping zones or the countries in your country dropdown.
Pick one valid code per country
Use the examples in the table above, or a real address from a post office website. Include a code with a space and one in lower case.
Submit the form in a private window
Select the country first, then type the code. Also test the opposite order: type the code, then change the country.
Test countries with no postal codes
Choose a country such as Hong Kong or Ireland-adjacent regions without codes where applicable and check that the field is not forced.
Read the page source or form settings
Look for
pattern=,maxlength=5,type="number"or a regex in custom JavaScript. These are the usual culprits.
How to fix it
There are two safe approaches. The best is to pick the rule from the selected country. The simplest is to accept any non-empty text and let your carrier or address check catch real mistakes. A wrong-but-accepted code is cheaper than a lost order.
Find where the rule comes from
In WooCommerce, postcode validation follows the country chosen in Settings > General > Selling location(s). Deactivate custom checkout plugins or snippets one at a time to find the one adding a ZIP-only rule.
Fix form plugins
In Contact Form 7, Gravity Forms, WPForms or similar, change the field to a plain text field and remove any pattern or number-only validation. Gravity Forms has an International address type that does not force a US ZIP.
Use native checkout validation
Shopify checks postal codes per country by default. If a code is rejected, confirm the country in Settings > Markets and shipping zones includes that country.
Check apps and theme code
Disable address or checkout apps one by one. Search the theme code (Online Store > Themes > Edit code) for
patternor\d{5}on postcode fields.
Look for injected scripts
Custom HTML tags sometimes add validation to forms. Open Tags in your container and check any tag that mentions
zip,postalorpostcode. Pause it in Preview mode and retest.
Edit the input field
Select the field, open Element Settings and make sure the type is Text, not Number. Remove any custom attributes such as
patternunder Custom attributes.Check custom code
Look in Site settings > Custom code and page-level embeds for scripts that validate the field.
Use a text field
In the form builder, use a Postal Code field or a single-line text field. Avoid number fields. Remove any custom JavaScript added to the form or funnel page that restricts the format.
Change the input type
In the Wix form builder, use a Short text field for the code rather than a Number field, and clear any custom validation rules. For Wix Stores, check Settings > Shipping and delivery that the country is enabled.
Adjust form fields
In a Form Block, use a Text field for the code. For Commerce, confirm the country is in your shipping options. Look in Code Injection for scripts that add validation.
Validate per country or loosely
Replace the single regex with a lookup by country code, or only check length. See the snippet below.
const postalRules = {
US: /^\d{5}(-\d{4})?$/,
GB: /^[A-Za-z]{1,2}\d[A-Za-z\d]? ?\d[A-Za-z]{2}$/,
CA: /^[A-Za-z]\d[A-Za-z] ?\d[A-Za-z]\d$/,
NL: /^\d{4} ?[A-Za-z]{2}$/,
DE: /^\d{5}$/
};
function isPostalCodeOk(country, value) {
const code = value.trim();
if (code === '') return false;
const rule = postalRules[country];
if (!rule) return code.length <= 12; // unknown country: accept
return rule.test(code);
}Before
- One pattern: 5 digits for every country
- Field type is number
- UK, Canadian and Dutch codes show an error
- Visitors abandon at the address step
After
- Rule chosen from the selected country
- Field type is text, spaces allowed
- Unknown countries accept any short value
- Address step completes for every market
How to confirm it's fixed
- A valid code from each target country is accepted
- Codes with a space, lower case or hyphen are accepted
- A clearly wrong value (for example 'abc') still shows a helpful message
- Codes with leading zeros keep the zero
- Countries without postal codes can submit without one
- The submitted code appears correctly in the order, email and CRM
- Test on mobile as well as desktop
How to prevent it happening again
Theme updates, new form plugins and checkout apps can bring back a US-only rule. Keep a short list of test addresses, one per market, and run them after any change to forms, checkout or plugins. When you open a new market, add its code to the list before launch. Ask developers to use a maintained address library instead of hand-written patterns.
How FunnelGuard handles this
FunnelGuard does not check this yet. Testing postal codes from many countries is a possible future check, but today it is not something FunnelGuard reports on.
What FunnelGuard does do is run your real lead form or checkout journey on a schedule, from the EU or the US, and check each step. If a form stops submitting, a step breaks, or a test lead never reaches your inbox or CRM, you get one alert with a screenshot and a likely cause after a second-region re-check. That helps if a bad validation change blocks the standard journey, but it will not tell you that a Canadian code is being rejected.
To watch for this issue, keep the manual test list above and rerun it after changes. You can also review your analytics for a drop in completed checkouts from non-US countries, and ask support to flag customer emails that mention an invalid postcode. The Free plan (1 site, 2 journeys, daily checks) is a way to monitor your main journey in the meantime.
Day 1
A developer adds a 5-digit ZIP rule for the US launch.
Month 2
Ads start reaching UK and Canadian visitors.
Month 2 onward
Foreign buyers hit an invalid code error and leave. No error is logged.
Month 4
Someone notices low international conversion and tests a UK code.
Fix day
Rule is switched to per-country validation and orders recover.
Questions people ask
Why does my checkout say my postcode is invalid?
The form is probably using a rule built for one country, often five digits for US ZIP codes. A valid UK, Canadian or Dutch code does not match that pattern, so it is rejected. The fix is to validate based on the selected country or loosen the rule.
How do I validate international postal codes on a form?
Choose the pattern from the country the visitor selected, and fall back to a simple length check for countries you have no rule for. Use a text field, not a number field, and allow spaces and hyphens. A maintained address library is safer than hand-written patterns.
Should the postal code field be required for every country?
No. Some countries, such as Hong Kong, do not use postal codes. Make the field required only when the selected country uses them, otherwise buyers from those countries cannot finish the form.
Why does my form drop the leading zero from a ZIP code?
The field is likely set to type number, which treats the value as a numeric amount and removes leading zeros. Change the input to type text. This also lets letters and spaces through for UK and Canadian codes.
How do I test if my website rejects foreign postal codes?
Select each country you serve, enter a real valid postal code for it, and submit the form in a private window. Also test lower case, extra spaces and the order of selecting country and code. Repeat after any plugin, theme or checkout change.
Can FunnelGuard detect postal code validation errors?
Not yet. FunnelGuard does not check postal codes from different countries, though it could be a future check. It does run your real form or checkout journey on a schedule and alerts you if the journey itself breaks.
Is it safe to just accept any postal code?
Yes, for most lead forms and many shops. A mistyped code is less costly than a lost order. If accuracy matters for shipping, validate per country and confirm the address with your carrier or an address-check service.
Related issues
- PRF-361Address form requires US-style state/ZIP for other countriesFix guide
- PRF-360Phone field forces one country formatFix guide
- PRF-363Name fields reject accents, apostrophes or non-Latin scriptsFix guide
- PRF-368Shipping not available to visitor's country discovered at checkoutFix guide
- PRF-353Untranslated form labels/errors on translated pageFix guide
- PRF-348Visitor sees wrong language version (geo/browser redirect wrong)Fix guide