"Our form accepts addresses from around the world" is a sentence that appears in a lot of product copy and survives in very few codebases. International support usually means a US address form with a country dropdown added at the end — and a validation stack that still assumes every address has a five-digit ZIP, a two-letter state and a street name that fits in thirty characters.

The assumptions baked into a US-shaped form

Start listing what a typical address form quietly requires: a numeric five-digit postcode, a state chosen from a fixed list, a street line under a certain length, a city with no accents. Now compare that with a UK postcode like SW1A 1AA, a Canadian one like M5V 2T6, a Japanese address with a prefecture and no street number, or a German street name with an umlaut. Each one violates at least one of those assumptions.

The failures are not dramatic. A postcode with letters gets rejected. A long street name is truncated. A region that is not in the state list cannot be selected, so the form cannot be submitted at all. Users from those countries do not file bug reports; they abandon the form.

Postcodes are strings, full stop

The single most reusable fix is to treat every postal code as an opaque string. Do not parse it, do not coerce it to a number, do not uppercase or strip it unless the country's rules say to. A leading-zero US ZIP and a letter-containing UK postcode are the same lesson from different directions: these are identifiers that happen to be made of characters.

Similarly, make the state or region field conditional on the selected country. Plenty of countries have no equivalent of a US state, and requiring one excludes their residents. Put the country field first and let it shape the form.

Test the branches, not just the default

A form that genuinely supports multiple countries has multiple validation branches, and each needs a fixture. Keep a stable set: a US address with a leading-zero ZIP, a UK address with an alphanumeric postcode, a Canadian address with a spaced postal code, a country with no state field, and an address with an accented street name. Run all of them through the full flow on every build.

AddressLab is a free, no-sign-up generator that produces synthetic addresses across multiple countries, with state, ZIP/postcode, phone and formatted full-address fields, and exports selected fields as CSV or JSON. Check a set into your repo so the international branches are exercised automatically rather than discovered by a customer in another country. Generated addresses are for development, testing, education and prototypes — they are not real identities and will not receive mail.

International support is not a dropdown. It is a promise that your data model can hold the addresses your users actually have. Test accordingly.