Address form validation test cases for checkout, signup, and QA
Use these address form validation test cases to check ZIP codes, state fields, city matching, international formats, apartment lines, and import workflows.
Address validation fails at the edges
Address forms usually work for the developer's own country. They break when a user enters a long city name, an alphanumeric postcode, an apartment line, a state abbreviation, or a country where the field order is different.
A useful test plan should check structure, field relationships, display formatting, imports, exports, and downstream behavior. The goal is not to prove that one sample address submits. The goal is to prove that the product handles the range of addresses it claims to support.
Core validation test cases
| Case | Example to test | Bug it can reveal |
|---|---|---|
| Required fields | Missing street, city, or postal code | Weak error messages or wrong required-field rules. |
| Postal code pattern | US 5-digit ZIP, UK alphanumeric postcode, India 6-digit PIN | Regex that only supports one country. |
| City and region match | ZIP belongs to the selected city and state | Tax, shipping, and CRM records assigned to the wrong region. |
| Secondary unit | Apt, Suite, Unit, Floor | Address line 2 discarded or merged incorrectly. |
| Long values | Long city, province, or street names | UI overflow, truncated exports, or database length errors. |
| Copy and import | CSV and JSON round trips | Column mapping, escaping, or encoding bugs. |
US-specific checks
- Accept two-letter state abbreviations and map them to display names.
- Do not treat every five-digit number as a valid ZIP for every state.
- Test ZIP+4 even if your product stores only the first five digits.
- Keep billing and shipping addresses separate when checkout logic depends on both.
- Include tax-free, taxable, and local-tax boundary states in the fixture set.
- Check that phone formatting does not overwrite the address region.
International checks
- Allow letters, spaces, and hyphens in postal codes where the country requires them.
- Do not require a state or province for every country.
- Support countries where the postal code appears before the city.
- Keep labels localizable: ZIP code, postal code, postcode, PIN code, and PLZ are not the same UI copy.
- Test non-Latin city names and romanized display variants.
- Make sure CSV exports preserve accents, apostrophes, and leading zeroes.
A small but strong test matrix
Start with ten fixtures: one ordinary US address, one US apartment, one Delaware or Oregon tax-free address, one Alaska boundary case, one California taxable address, one UK postcode, one German PLZ, one Japanese postal-code example, one India PIN-code example, and one non-Latin address.
That set will catch more practical validation bugs than a large batch of addresses from only one country.