Address autocomplete is one of those features that feels finished the moment it works once. You type "1600 Amp", pick the suggestion, and a beautifully structured object lands in your form: street, city, state, ZIP, country. It is tempting to treat that object as ground truth and stop thinking about validation.
Then a real user shows up with one of these.
1. The unit that got flattened
Autocomplete providers disagree about apartments. Some return 1600 Amphitheatre Parkway, Apt 4B as a single street line; others split the unit into a separate field your form does not have. If your schema only has address1 and address2, make sure the provider's unit value has somewhere to go. Otherwise "Apt 4B" silently becomes part of the street, and your shipping label generator — which assumed a clean street line — starts producing garbage.
2. The ZIP that lost its zero
This one is classic. A provider returns 02139 as a string. Somewhere between the API response and your database, a well-meaning parseInt turns it into 2139. Now the address fails validation, or worse, it validates and geocodes to the wrong place. ZIP codes are identifiers, not numbers. Treat them as strings from the autocomplete response all the way to storage.
3. The address the provider does not know
New construction, rural routes, a freshly subdivided lot — autocomplete databases lag reality by weeks or months. A user who picks the "closest" suggestion is actually entering a different address than the one they live at. Your form needs an escape hatch: a manual-entry path that is just as valid as the suggested one, and validation that accepts a well-formed address even when the provider returns nothing.
4. The international address that is not US-shaped
If your product claims international support, autocomplete will happily return a Paris or São Paulo address whose "state" is a region, whose postal code has letters, and whose street line is longer than your maxlength. A form designed around USPS data will mangle it. The fix starts with a country field that drives the whole form's shape — not a US form with a country dropdown bolted on at the end.
5. The address that looks fine but is a test value
Here is the one that bites teams in staging. Someone pastes 123 Main St, Springfield, 12345 into the autocomplete field during a demo, the provider returns nothing useful, and the form's fallback accepts it. That same placeholder then propagates through fixtures, screenshots and seed data until nobody can tell test addresses from real ones.
Make the awkward cases your default fixtures
The way out is not more code in the autocomplete handler. It is a stable library of awkward addresses that you run through the entire flow — suggestion, fallback, validation, storage, export — on every build. Include the leading-zero ZIP, the flattened unit, the provider miss, the international format and the obviously-fake placeholder.
AddressLab is a free, no-sign-up generator for exactly this kind of synthetic address data. It produces US records with leading-zero ZIPs, unit designators, state and phone fields, plus multi-country formats, and exports the selected fields as CSV or JSON so you can check the fixtures into your repo. Generated addresses are for development, testing, education and prototypes — they are not real identities and will not receive mail.
Autocomplete is a convenience layer, not a validation layer. Keep testing the cases it gets wrong, and your form will survive the users it was not designed for.