missing_locality
A country with no postcode to name the town was given neither
The operator treats the locality — the town, city or post town — as mandatory, and the address names neither a town nor a postcode that identifies one.
- appears in
- reason
- credits
- Free. An address that cannot stand as written never costs a credit.
What it means
A postcode identifies the town, so an address that carries one is not refused for leaving the town out: a British street and postcode, or an American street and ZIP, both stand. This reason is for the countries with no postcodes at all, where the town is the only geography the address has.
A town written on the wrong line, or run into the street line without a separator, can be missed by the parser: send the separated fields when you already hold them apart.
What to do
Fill in `locality` (or put the town on its own line in the written address). Where you hold only a postcode, the postcode endpoint of a country whose directory is installed can supply the town.
Example response
{
"valid": false,
"reason": "missing_locality",
"country": "BS",
"locality": null,
"postal_code": null,
"risk_score": null
}Abbreviated: a real answer carries all 33 fields, listed in the validate-phone reference.
Related
- empty_address · nothing in the request was an address
- unknown_country · no postal format is published for that country
- missing_street · the country requires a street line and none was found
- missing_administrative_area · a country with no postcodes needs the state or province
- missing_postal_code · the country requires a postcode and none was given
- invalid_postal_code · the postcode is not the shape that country uses
- postcode_not_found · the postcode is well formed but is not in the directory
- All verdict reasons
- Phone fields and the risk score
- API reference
markdown version: /docs/reasons/missing_locality.md