Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Address form rejects valid postcode: how to find and fix it

CNV-182High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A postcode (called a ZIP code in the US) is the part of an address used to work out delivery and tax. This issue happens when a customer types a valid postcode and the checkout still says it is invalid, or silently shows no delivery options for it.

There are two common forms. In the first, a field error appears, such as "Please enter a valid postcode". In the second, there is no error at all, but the shipping step stays empty or says nothing is available.

Why it costs you leads or sales

The customer has already chosen products and started paying. A rejected address is a hard stop. Most people won't guess what is wrong. They leave, and you never see the lost order because nothing errors on your side.

It often hits only some customers: one region, one country, or postcodes with spaces or lowercase letters. That makes it easy to miss in your own testing.

Where the checkout breaks
  1. CartItems added
  2. Address formValid postcode rejected or no rates
  3. Shipping methodNever reached
  4. PaymentNever reached
  5. Order confirmedNo sale, no purchase tag

The customer enters a real postcode and the flow stops at the address step.

Orders completed by postcode typeExample numbers
Orders completed by postcode type (example)Postcodes that pass: 60 %; Postcodes with a space: 12 %; Newer postcode ranges: 8 %0234660128Postcodes that passPostcodes with a spaceNewer postcode ranges%

Example: illustrative numbers showing how a bad rule on one postcode format drags down completion for those customers only.

How to check if your site has it

Run a test order as a customer would, using real postcodes. Don't just test your own.

Postcodes to test
  • Your own postcode, to confirm the baseline works
  • A postcode typed with a space and without one (for example SW1A 1AA and SW1A1AA)
  • The same postcode in lowercase
  • A rural or newly issued postcode in each country you ship to
  • A US ZIP+4 code such as 90210-1234 if you sell in the US
  • A postcode in each shipping zone you have set up
  • A postcode for a territory or island you list as shipped to
  • Autofilled addresses from the browser, as well as typed ones

For each one, note whether you get a field error, an empty shipping step, or normal rates. Also open the browser console and network tab. A failed address or rates request there points to the cause.

What you see and the likely cause
SymptomLikely cause
Field error on valid postcode with a spaceFormat rule too strict (pattern or regex)
Field error for one country onlyWrong country format or validator set for that country
No error, but no shipping ratesPostcode not covered by a shipping zone or rate
Works typed, fails when autofilledExtra spaces or different casing in the value
Newer postcodes failOutdated address database or validation app

How to fix it

Fix a rejected postcode
  1. Reproduce it with the exact value

    Copy the postcode and country the customer used. Enter it in a test checkout and note the exact message.

  2. Find who is rejecting it

    Check the network tab. If the rejection comes from your theme or custom script, fix the pattern. If it comes from an app or a rates service, fix it there.

  3. Normalise the input

    Trim spaces, ignore case and accept the code with or without the internal space before you validate it.

  4. Cover the postcode in shipping zones

    If there is no error but no rates, add the postcode's country or region to a shipping zone and give it a rate.

  5. Retest every format

    Repeat the checklist above and place one test order end to end.

Where to change it
  1. Check shipping zones

    Go to Settings > Shipping and delivery and open the profile. Confirm the customer's country or region is in a zone with a rate.

  2. Review apps and scripts

    Disable any address validation or postcode-restriction app and retest. Check theme code that limits postcodes, if you added any.

  3. Check the country list

    In Settings > Markets, make sure the country is enabled for selling and shipping.

Forgiving UK postcode check (normalise, then test)javascript
function isValidUkPostcode(input) {
  const value = input.trim().toUpperCase().replace(/\s+/g, '');
  return /^[A-Z]{1,2}[0-9][A-Z0-9]?[0-9][A-Z]{2}$/.test(value);
}

console.log(isValidUkPostcode('sw1a 1aa')); // true
console.log(isValidUkPostcode('SW1A1AA'));  // true
Postcode handling

Broken

  • Pattern rejects spaces or lowercase
  • One rule applied to every country
  • Postcode missing from every shipping zone

Fixed

  • Input is cleaned before checking
  • Rule chosen by country
  • Every sold-to postcode matches a zone and rate

How to confirm it's fixed

Repeat every postcode from your test list in a fresh browser session. Each one should reach the shipping step and show at least one rate. Then complete a test order, using your store's test mode where you have it, and check that it appears in your orders.

How to prevent it happening again

Habits that keep it fixed
  • Test real postcodes from each market after any change to shipping zones, apps or the checkout theme
  • Keep a short list of tricky postcodes (spaces, rural, new ranges) and reuse it
  • Avoid hand-written postcode patterns where the platform's own validation is enough
  • Update address validation apps and plugins on a schedule, on staging first
  • Look at support emails for any mention of 'invalid postcode'

How FunnelGuard handles this

FunnelGuard detects this issue only partly. Its journey fills in the address step and then checks whether shipping is available: it flags it when no rates come back for a valid postcode. It does not read the field error message itself, so a visible 'invalid postcode' warning is not detected as such.

That means FunnelGuard covers the empty-shipping case for the postcode your journey uses. It does not cover every postcode, country or format a real customer might type. To cover the rest by hand, run the postcode checklist above after each change, and add a postcode from each shipping zone to your own test routine.

When a check fails, it is re-run from a second region before one alert goes out, with a screenshot and a likely cause. You can try it with the Free plan (1 site, 2 journeys, daily checks, no card), or use the free read-only website audit.

Questions people ask

Why does my checkout say my postcode is invalid when it's correct?

The most common causes are a format rule that rejects spaces or lowercase letters, a rule meant for another country, or an outdated address validator that doesn't know newer postcodes. Try the code with and without the space, then check which app or script produces the error.

Why do I get no shipping rates for a valid postcode?

The postcode probably isn't covered by any shipping zone or rate. Check that its country or region is in a zone, and that any postcode ranges or wildcards on that zone include it.

How do I fix an invalid postcode error in WooCommerce?

Go to WooCommerce > Settings > Shipping and check the zone's postcode limits. Then disable any checkout field or address validation plugin, retest, and update WooCommerce on a staging copy.

How do I fix an invalid postal code error on Shopify?

Check Settings > Shipping and delivery for a zone and rate covering the country, and confirm the country is enabled in Settings > Markets. If the error persists, disable address validation apps and retest.

Should I validate postcodes with a regex?

Only loosely. Trim spaces, ignore case and pick the pattern by country. Strict patterns reject real codes, so a warning is often safer than blocking the order.

Can FunnelGuard detect a rejected postcode?

Partly. It fills in the address step and flags when no shipping rates are available for a valid postcode. It does not read field error messages and only tests the postcodes in your journey.

Why does the postcode work when typed but fail when autofilled?

Autofill can add extra spaces, different casing or a ZIP+4 suffix. Normalise the value before validating, and test autofilled addresses as well as typed ones.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: intl_input_accepted on language / country variant runs (Stage 28): postcode errors after fill_address on variant runs.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.