United States
| Property | Value |
|---|---|
| Code | US |
| Currency | USD |
| Region | Americas, Northern America |
| Name order | Given name first |
| State | State, a list of 57 |
| Postcode | Required, checked, like 90210, and by state |
| Rules | GET /v1/countries/US |
Form
The address form, in English. A field that is not required shows its optional label.
Fields
| Field | Label | Required | Autocomplete |
|---|---|---|---|
country | Country (list) | yes | country |
first_name | First name | yes | given-name |
last_name | Last name | yes | family-name |
line1 | Address | yes | address-line1 |
line2 | Apartment, suite, etc. | no | address-line2 |
city | City | yes | address-level2 |
state | State (list) | yes | address-level1 |
postcode | ZIP Code | yes | postal-code |
phone_number | Phone number | no | tel |
email | yes | email |
Postcode
| Rule | Value |
|---|---|
| Required | yes |
| Pattern | ^[0-9]{5}([0-9]{4}|[0-9]{6})?$ |
| Example | 90210 |
| Written as | #####, #####-####, #####-###### |
| Checked by state | 56 of 57, below |
POST /v1/validate refuses a postcode sent with a state it does not start like, as not_in_state. A state not listed is checked by pattern only. From libaddressinput.
| State | Starts with |
|---|---|
Alabama (AL) | 3[56] |
Alaska (AK) | 99[5-9] |
American Samoa (AS) | 96799 |
Arizona (AZ) | 8[56] |
Arkansas (AR) | 71[6-9]|72 |
California (CA) | 9[0-5]|96[01] |
Colorado (CO) | 8[01] |
Connecticut (CT) | 06 |
Delaware (DE) | 19[7-9] |
District of Columbia (DC) | 20[02-5]|569 |
Florida (FL) | 3[23]|34[1-9] |
Georgia (GA) | 3[01]|398|39901 |
Guam (GU) | 969([1-2]\d|3[12]) |
Hawaii (HI) | 967[0-8]|9679[0-8]|968 |
Idaho (ID) | 83[2-9] |
Illinois (IL) | 6[0-2] |
Indiana (IN) | 4[67] |
Iowa (IA) | 5[0-2] |
Kansas (KS) | 6[67] |
Kentucky (KY) | 4[01]|42[0-7] |
Louisiana (LA) | 70|71[0-5] |
Maine (ME) | 039|04 |
Maryland (MD) | 20[6-9]|21 |
Massachusetts (MA) | 01|02[0-7]|05501|05544 |
Michigan (MI) | 4[89] |
Minnesota (MN) | 55|56[0-7] |
Mississippi (MS) | 38[6-9]|39[0-7] |
Missouri (MO) | 6[3-5] |
Montana (MT) | 59 |
Nebraska (NE) | 6[89] |
Nevada (NV) | 889|89 |
New Hampshire (NH) | 03[0-8] |
New Jersey (NJ) | 0[78] |
New Mexico (NM) | 87|88[0-4] |
New York (NY) | 1[0-4]|06390|00501|00544 |
North Carolina (NC) | 2[78] |
North Dakota (ND) | 58 |
Northern Mariana Islands (MP) | 9695[0-2] |
Ohio (OH) | 4[3-5] |
Oklahoma (OK) | 7[34] |
Oregon (OR) | 97 |
Pennsylvania (PA) | 1[5-8]|19[0-6] |
Puerto Rico (PR) | 00[679] |
Rhode Island (RI) | 02[89] |
South Carolina (SC) | 29 |
South Dakota (SD) | 57 |
Tennessee (TN) | 37|38[0-5] |
Texas (TX) | 7[5-9]|885|73301|73344 |
Utah (UT) | 84 |
Vermont (VT) | 05 |
Virgin Islands, U.S. (VI) | 008 |
Virginia (VA) | 201|2[23]|24[0-6] |
Washington (WA) | 98|99[0-4] |
West Virginia (WV) | 24[7-9]|2[56] |
Wisconsin (WI) | 5[34] |
Wyoming (WY) | 82|83[01]|83414 |
Phone
| Rule | Value |
|---|---|
| Calling code | +1 |
| National prefix | 1 |
| Pattern | ^[0-9]{10,11}$ |
| Example | (201) 555-0123 |
| Written as | (###) ###-#### |
Address format
How an address is written for reading, on an order page, a receipt or a label: address.format in the rules.
{first_name} {last_name}
{line1}
{line2}
{city}, {state} {postcode}
{country}On an envelope, the city and state are written in capitals.
Example
A real address in United States, from address.example, written with the format and the state by its name:
Jane Doe
1600 Pennsylvania Avenue NW
Washington, District of Columbia 20500
United StatesState
The form submits the code, which is what an order stores; the name is what the shopper reads, in their language.
| Code | Name |
|---|---|
AL | Alabama |
AK | Alaska |
AS | American Samoa |
AZ | Arizona |
AR | Arkansas |
CA | California |
CO | Colorado |
CT | Connecticut |
DE | Delaware |
DC | District of Columbia |
FL | Florida |
GA | Georgia |
GU | Guam |
HI | Hawaii |
ID | Idaho |
IL | Illinois |
IN | Indiana |
IA | Iowa |
KS | Kansas |
KY | Kentucky |
LA | Louisiana |
ME | Maine |
MD | Maryland |
MA | Massachusetts |
MI | Michigan |
MN | Minnesota |
MS | Mississippi |
MO | Missouri |
MT | Montana |
NE | Nebraska |
NV | Nevada |
NH | New Hampshire |
NJ | New Jersey |
NM | New Mexico |
NY | New York |
NC | North Carolina |
ND | North Dakota |
MP | Northern Mariana Islands |
OH | Ohio |
OK | Oklahoma |
OR | Oregon |
PA | Pennsylvania |
PR | Puerto Rico |
RI | Rhode Island |
SC | South Carolina |
SD | South Dakota |
TN | Tennessee |
TX | Texas |
UM | United States Minor Outlying Islands |
UT | Utah |
VT | Vermont |
VI | Virgin Islands, U.S. |
VA | Virginia |
WA | Washington |
WV | West Virginia |
WI | Wisconsin |
WY | Wyoming |
Messages
What the form shows under a field when a value is refused, in English. Every language is on its page under Languages.
| Field | Error | Message |
|---|---|---|
country | not_selected | Select a country |
first_name | blank | Enter a first name |
first_name | invalid_characters | First name can only contain letters, spaces, hyphens and apostrophes |
first_name | contains_emoji | First name can't contain emojis |
first_name | too_long | First name must be 255 characters or fewer |
last_name | blank | Enter a last name |
last_name | invalid_characters | Last name can only contain letters, spaces, hyphens and apostrophes |
last_name | contains_emoji | Last name can't contain emojis |
last_name | too_long | Last name must be 255 characters or fewer |
line1 | blank | Enter an address |
line1 | contains_emoji | Address can't contain emojis |
line1 | too_long | Address must be 255 characters or fewer |
line2 | blank | Enter address line 2 |
line2 | contains_emoji | Address line 2 can't contain emojis |
line2 | too_long | Address line 2 must be 255 characters or fewer |
city | blank | Enter a city |
city | invalid | Enter a valid city |
city | contains_emoji | City can't contain emojis |
city | too_long | City must be 255 characters or fewer |
state | not_selected | Select a state |
state | invalid | Choose a state from the list |
postcode | blank | Enter a ZIP Code |
postcode | invalid | Enter a valid ZIP Code, like 90210 |
postcode | contains_emoji | ZIP Code can't contain emojis |
postcode | too_long | ZIP Code must be 64 characters or fewer |
phone_number | blank | Enter a phone number |
phone_number | invalid | Enter a valid phone number, like (201) 555-0123 |
phone_number | contains_emoji | Phone number can't contain emojis |
phone_number | too_long | Phone number must be 24 characters or fewer |
email | blank | Enter an email address |
email | invalid | Enter a valid email, like name@example.com |
email | contains_emoji | Email can't contain emojis |
email | too_long | Email must be 254 characters or fewer |