Mexico

PropertyValue
CodeMX
CurrencyMXN
RegionAmericas, Central America
Name orderGiven name first
StateState/province, a list of 32
PostcodeRequired, checked, like 02860, and by state
RulesGET /v1/countries/MX

Form

The address form, in English. A field that is not required shows its optional label.

CountryMexico First name Last name Address Apartment, suite, etc. (optional) Postal code02860 City State/provinceChoose… Phone number (optional)222 123 4567

Fields

FieldLabelRequiredAutocomplete
countryCountry (list)yescountry
first_nameFirst nameyesgiven-name
last_nameLast nameyesfamily-name
line1Addressyesaddress-line1
line2Apartment, suite, etc.noaddress-line2
postcodePostal codeyespostal-code
cityCityyesaddress-level2
stateState/province (list)yesaddress-level1
phone_numberPhone numbernotel
emailEmailyesemail

Postcode

RuleValue
Requiredyes
Pattern^[0-9]{5}$
Example02860
Written asas typed
Checked by state32 of 32, 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.

StateStarts with
Aguascalientes20
Baja California2[12]
Baja California Sur23
Campeche24
Chiapas29|30
Chihuahua3[1-3]
Ciudad de México0|1[0-6]
Coahuila de Zaragoza2[5-7]
Colima28
Durango3[45]
Guanajuato3[6-8]
Guerrero39|4[01]
Hidalgo4[23]
Jalisco4[4-9]
Michoacán de Ocampo5[89]|6[01]
Morelos62
México5[0-7]
Nayarit63
Nuevo León6[4-7]
Oaxaca6[89]|7[01]
Puebla7[2-5]
Querétaro76
Quintana Roo77
San Luis Potosí7[89]
Sinaloa8[0-2]
Sonora8[3-5]
Tabasco86
Tamaulipas8[7-9]
Tlaxcala90
Veracruz de Ignacio de la Llave9[1-6]
Yucatán97
Zacatecas9[89]

Phone

RuleValue
Calling code+52
National prefixnone
Pattern^[0-9]{10}$
Example222 123 4567
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.

CODE
{first_name} {last_name}
{line1}
{line2}
{postcode} {city}, {state}
{country}

On an envelope, the city and state/province and postal code are written in capitals.

Example

A real address in Mexico, from address.example, written with the format and the state by its name:

CODE
Juan Pérez
Calle de Tacuba 1
Col. Centro
06000 Cuauhtémoc, Ciudad de México
Mexico

State/province

The form submits the code, which is what an order stores; the name is what the shopper reads, in their language.

CodeName
AguascalientesAguascalientes
Baja CaliforniaBaja California
Baja California SurBaja California Sur
CampecheCampeche
ChiapasChiapas
ChihuahuaChihuahua
Ciudad de MéxicoCiudad de México
Coahuila de ZaragozaCoahuila de Zaragoza
ColimaColima
DurangoDurango
GuanajuatoGuanajuato
GuerreroGuerrero
HidalgoHidalgo
JaliscoJalisco
Michoacán de OcampoMichoacán de Ocampo
MorelosMorelos
MéxicoMéxico
NayaritNayarit
Nuevo LeónNuevo León
OaxacaOaxaca
PueblaPuebla
QuerétaroQuerétaro
Quintana RooQuintana Roo
San Luis PotosíSan Luis Potosí
SinaloaSinaloa
SonoraSonora
TabascoTabasco
TamaulipasTamaulipas
TlaxcalaTlaxcala
Veracruz de Ignacio de la LlaveVeracruz de Ignacio de la Llave
YucatánYucatán
ZacatecasZacatecas

Messages

What the form shows under a field when a value is refused, in English. Every language is on its page under Languages.

FieldErrorMessage
countrynot_selectedSelect a country
first_nameblankEnter a first name
first_nameinvalid_charactersFirst name can only contain letters, spaces, hyphens and apostrophes
first_namecontains_emojiFirst name can't contain emojis
first_nametoo_longFirst name must be 255 characters or fewer
last_nameblankEnter a last name
last_nameinvalid_charactersLast name can only contain letters, spaces, hyphens and apostrophes
last_namecontains_emojiLast name can't contain emojis
last_nametoo_longLast name must be 255 characters or fewer
line1blankEnter an address
line1contains_emojiAddress can't contain emojis
line1too_longAddress must be 255 characters or fewer
line2blankEnter address line 2
line2contains_emojiAddress line 2 can't contain emojis
line2too_longAddress line 2 must be 255 characters or fewer
postcodeblankEnter a postal code
postcodeinvalidEnter a valid postal code, like 02860
postcodecontains_emojiPostal code can't contain emojis
postcodetoo_longPostal code must be 64 characters or fewer
cityblankEnter a city
cityinvalidEnter a valid city
citycontains_emojiCity can't contain emojis
citytoo_longCity must be 255 characters or fewer
statenot_selectedSelect a state or province
stateinvalidChoose a state or province from the list
statecontains_emojiState or province can't contain emojis
statetoo_longState or province must be 255 characters or fewer
phone_numberblankEnter a phone number
phone_numberinvalidEnter a valid phone number, like 222 123 4567
phone_numbercontains_emojiPhone number can't contain emojis
phone_numbertoo_longPhone number must be 24 characters or fewer
emailblankEnter an email address
emailinvalidEnter a valid email, like name@example.com
emailcontains_emojiEmail can't contain emojis
emailtoo_longEmail must be 254 characters or fewer