Skip to main content

Documentation Portal

Address Field Validations

Validating the Checkout Page Address Fields

The address information submitted on the Checkout Page is important to ensure the order is shipped to the right destination. Validations are also performed on the field level.

Address Fields

The address form includes the following fields. Some fields are mandatory.

For more information about each field, open the sections below. See also Address Field Formats and Error Handling.

Address Field Formats and Error Handling

The address form contains address fields with the following formats and error notifications.

Field

Format

Error notifications

Address Line1

  1. Maximum length is 35 characters.

  2. If the shipping method is one of the following:

    1. Express

    2. ExpressCourierWithoutSameDay

    3. Standard

      A PO Box won’t be accepted as an address without a delivery address.

  3. When unsupported characters are identified, the field is marked and a notification is displayed. Allows letters, numbers, and specific special characters.

  4. Additional format validation may be configured per country.

When the 36th character is attempted a notification is displayed:

You’ve reached the maximum limit for Address Line 1 field. Please use Address Line 2 if you need more space”

image6.png

The following notification displays:

Title: PO box address is not allowed on this shipping method

Content: Dear Customer, The courier service you have selected requires a signature upon delivery. We are therefore unable to accept orders to a PO box address. To continue, please provide an alternative shipping address

Address Line 2

  1. Maximum length is 35 characters.

    Additional characters are not accepted.

  2. If the shipping method is one of the following:

    1. Express

    2. ExpressCourierWithoutSameDay

    3. Standard

      A PO Box won’t be accepted as an address without a delivery address.

  3. When Unsupported characters are identified the field is marked and notification displays. Allows letters, numbers, and specific special characters.

  4. Additional format validation may be configured per country.

The following notification displays when a PO Box is added as an address to the shipping methods mentioned:

Title: PO box address is not allowed on this shipping method Content:

Dear Customer, The courier service you have selected requires a signature upon delivery. We are therefore unable to accept orders to a PO box address. To continue, please provide an alternative shipping address

City/Suburb

  1. Maximum length is 35 characters.

  2. Offers dropdown suggestions and dynamic city-region pairing for select countries.

  3. Allows letters and hyphens.When unsupported characters are identified, the field is marked and a notification is displayed.

  4. Additional format validation may be configured per country.

When unsupported characters are identified, the field is marked in red and the checkout can not be completed until it is fixed.

Country

Changing the default country requires that the customer fills out a delivery address that is different from the billing address.

Country-specific address formatting and restricted country lists for some merchants.

County/Province/State

A dropdown menu for some regions that includes counties, states, or provinces.

For more details please see the Counties, States, and Provinces section.

Email

For registered users, pre-filled and locked if email already provided.

The following information defines what a valid email address is, based on: https://en.wikipedia.org/wiki/Email_address

Valid email addresses must comply with the following:

  1. Uppercase and lowercase Latin letters (A–Z,

    a–z) (ASCII: 65–90, 97–122)

    Digits 0 to 9 (ASCII: 48–57)

  2. These special characters:

    # - _ ~ ! $ & ' + | {} = “ / @

    Character. (dot, period, full stop), ASCII 46, provided that it is not the first or last character, and provided that it does not appear consecutively (e.g. [email protected] is not allowed).

    Special Characters for non-English languages (accents).

When an incorrect character is submitted, the field is marked in red, and an “X” is displayed on the right side.

image4.png

On mouseover, an “Email not Valid” tooltip is displayed

image5.png

First Name

  1. Maximum length is 40 Characters

  2. Cannot contain special characters or numbers. When unsupported characters are identified, the field is marked, and a notification is displayed.

  3. For more information about Special Characters, please see the Supported Characters section.

When unsupported characters are identified the field is marked in red and the checkout can not be completed until it is fixed.

Last Name

  1. Maximum length is 40 Characters

  2. Cannot contain special characters or numbers. When unsupported characters are identified, the field is marked and a notification is displayed.

  3. For more information about Special Characters, please see the Supported Characters section.

When unsupported characters are identified the field is marked in red and the checkout can not be completed until it is fixed.

Phone

  1. Following characters are allowed: Numbers, “+”, “-“, “/”, “(“ and “)”

  2. Maximum length is 15 characters

  3. When unsupported characters are identified, the field is marked and a notification is displayed.

  4. Drop-down menu of country prefixes can be enabled for applicable countries.

  5. Additional format validation may be configured per country. For more details please see the Phone Field Validations per Country section

Zip/Postcode

  1. Maximum length is 10 Characters

  2. When unsupported characters are identified, the field is marked and a notification is displayed.

  3. There is a configuration per country whether this field is mandatory or not

  4. Additional format validation may be configured per country. For more details please see the Zip/Postcode Field Validations per Country section

When no input is available, a mouseover displays a tooltip:

"Billing Zip/Postcode is required"

image7.png

When unsupported characters are identified the field is marked in red and the checkout can not be completed until it is fixed.

Phone Field Validations per Country

In addition to other field validations, a phone field format validation is configured for specific countries.

Specific validations can be set per Merchant.

Country

Field

Validation

Additional Info

Bahrain

Phone number

+973 prefix and 8 digits

Phone number with Prefix

8 digits

When international prefix is enabled

France

Phone Number

The number provide must include a "06" or "07" prefix

Required by Chronopost

Kuwait

Phone number

+965 prefix and 8 digits

Phone number with Prefix

8 digits

When international prefix is enabled

Oman

Phone number

+968 prefix and up to 8 digits

Phone number with Prefix

8 digits

When international prefix is enabled

Qatar

Phone number

+974 prefix and up to 8 digits

Phone number with Prefix

8 digits

When international prefix is enabled

Saudi Arabia

Phone number

+966 prefix and up to 10 digits

Phone number with Prefix

9 digits

When international prefix is enabled

Switzerland

Phone number

Starts with +41, 9 digits.

United Arab Emirates

Phone number

+971 prefix and up to 9 digits

Phone number with Prefix

9 digits

When international prefix is enabled

Zip/Postcode Field Validations per Country

In addition to the general field validations, a zip field format validation is configured for specific countries.

Specific validations can be set per Merchant.

Country

Field

Validation

Additional Info

Albania

Post Code

4 digits

Algeria

Post Code

5 digits

Andorra

Post Code

2 Capital letters and 3 digits (AB123)

Angola

Post Code

Field Optional

Antigua and Barbuda

Post Code

Field Optional

Argentina

Post Code

4 digits

Armenia

Post Code

4 digits

Aruba

Post Code

Field Optional

Austria

Post Code

4 digits

Australia

Post Code

4 digits

Azerbaijan

Post Code

4 digits

Bahamas

Post Code

Field Optional

Bahrain

Post Code

Field Disabled. Sending "00000"

Belarus

Post Code

6 digits

Belize

Post Code

Field Optional

Belgium

Post Code

4 digits

Benin

Post Code

Field Optional

Bolivia

Post Code

Field Optional

Bonaire, Saint Eustatius and Saba

Post Code

Field Optional

Botswana

Post Code

Field Optional

Bouvet Island

Post Code

Field Optional

Bulgaria

Post Code

4 digits

Burkina Faso

Post Code

Field Optional

Burundi

Post Code

Field Optional

Central African Republic

Post Code

Field Optional

Cambodia

Post Code

6 digits

Cameroon

Post Code

Field Optional

Canada

Post Code

5 or 6 digits

In one of the following formats: A1A 1A1 or A1A 1A

Chad

Post Code

Field Optional

Chile

Post Code

7 digits

China

Post Code

6 digits

Colombia

Post Code

6 digits

Comoros

Post Code

Field Optional

Congo

Post Code

Field Optional

Congo, Democratic Republic

Post Code

Field Required

Cook Islands

Post Code

Field Optional

Costa Rica

Post Code

5 digits

Cote D'Ivoire (Ivory Coast)

Post Code

Field Optional

Croatia

Post Code

5 digits

Curacao

Post Code

Field Optional

Cyprus

Postal Code

4 digits

Czech Republic

Post Code

5 digits

Denmark

Post Code

4 digits

Djibouti

Post Code

Field Optional

Dominica

Post Code

Field Optional

East Timor

Post Code

Field Optional

Ecuador

Post Code

6 digits

Egypt

Post Code

5 digits

Equatorial Guinea

Post Code

Field Optional

Eritrea

Post Code

Field Optional

Estonia

Post Code

5 digits

Fiji

Post Code

Field Optional

Finland

Post Code

5 digits

France

Post Code

5 digits

French Southern Territories

Post Code

Field Optional

Gabon

Post Code

Field Optional

Gambia

Post Code

Field Optional

Germany

Post Code

5 digits

Ghana

Post Code

Field Required

Greece

Post Code

5 digits

In the format XXX XX or XXXXX

Grenada

Post Code

Field Optional

Guatemala

Post Code

5 digits

Guinea

Post Code

Field Required

Guyana

Post Code

Field Optional

Hong Kong

Post Code

Field Disabled

Hungary

Post Code

4 digits

Iceland

Post Code

3 digits

India

Post Code

6 digits

Indonesia

Post Code

5, 6 digits

Ireland

Post Code

7 digits or 7 characters (Eircode)

Israel

Post Code

7 digits

Italy

Post Code

5 digits

Jamaica

Post Code

Field Optional

Japan

Post Code

7 digits (XXXXXXX or (XXX-XXXX)

 

Kazakhstan

Post Code

6 digits

Kiribati

Post Code

Field Optional

Korea (North)

Post Code

Field Optional

Kuwait

Post Code

5 digits

Liberia

Post Code

Field Optional

Libya

Post Code

Field Optional

Luxembourg

Post Code

4 digits

Macau

Post Code

Field Disabled. Sending "999087"

Malawi

Post Code

Field Optional

Malaysia

Post Code

5 digits

Field Optional

Mali

Post Code

Field Optional

Mauritania

Post Code

Field Optional

Mauritius

Post Code

Field Required

Mexico

Post Code

5 digits

Moldova

Post Code

4 digits

Monaco

Post Code

Field Disabled. Sending "98000"

Mongolia

Post Code

5 digits

Montenegro

Post Code

5 digits

Montserrat

Post Code

Field Required

Morrocco

Post Code

5 digits

Namibia

Post Code

Field Required

Nauru

Post Code

Field Required

Nigeria

Post Code

6 digits

New Zealand

Post Code

4 digits

Netherlands

Post Code

4 digits and 2 letters (1235 AB)

Netherlands Antilles

Post Code

Field Optional

Niue

Post Code

Field Required

Northern Macedonia

Post Code

4 digits

Norway

Post Code

4 digits

Oman

Post Code

3 digits

Panama

Post Code

Field Required

Philippines

Postal Code

4 digits

Poland

Post Code

5 digits (XX-XXX)

Portugal

Post Code

7 digits (XXX-XXXX)

Qatar

Post Code

Field Disabled. Sending "00000"

Reunion

Post Code

5 digits

Romania

Post Code

6 digits

Russia

Post Code

6 digits

Rwanda

Post Code

Field Required

Saint Kitts and Nevis

Post Code

Field Required

Saint Lucia

Post Code

Field Required

Sao Tome and Principe

Post Code

Field Optional

Saudi Arabia

Post Code

Field Disabled. Sending "00000"

Senegal

Post Code

5 digits

Serbia

Post Code

5 digits

Seychelles

Post Code

Field Optional

Sierra Leone

Post Code

Field Optional

Singapore

Post Code

6 digits

Sint Maarten

Post Code

Field Optional

Slovenia

Post Code

4 digits

Solomon Islands

Post Code

Field Optional

Somalia

Post Code

Field Optional

South Africa

Post Code

4 digits

South Korea

Post Code

5 digits no dash

South Cudan

Post Code

Field Optional

Spain

Post Code

5 digits

Sri Lanka

Post Code

4 digits

Suriname

Post Code

Field Optional

Syria

Post Code

Field Optional

Sweden

Post Code

5 digits

Tanzania

Post Code

Field Required

Thailand

Post Code

5 digit

Togo

Post Code

Field Optional

Tokelau

Post Code

Field Optional

Tonga

Post Code

Field Optional

Trinidad and Tobago

Post Code

Field Optional

Tunisia

Post Code

4, 5 digits

Turkey

Post Code

5 digits

Tuvalu

Post Code

Field Optional

Uganda

Post Code

Field Required

Ukraine

Post Code

5 digits

United Arab Emirates

Post Code

Field Disabled. Sending "00000"

United Kingdom

Post Code

Length is 5 to 8 characters.

Format begins with 1-2 uppercase letters followed by 1-2 digits, optionally a single letter, a space (optional), then ends with 1 digit and 2 uppercase letters.

Supports valid formats like SW1A 1AA, W1A 0AX, etc

United States

Post Code

5 or 9 (XXXXX-XXXX) digits

In the format XXXXX or XXXXX-XXXX

United States Minor Outlying Islands

Post Code

Field Optional

Uzbekistan

Post Code

6 digits (XXX XXX or XXXXXX)

In the format XXXXXX or XXX XXX

Vanuatu

Post Code

Field Optional

Venezuela

Post Code

4 digits

Yemen

Post Code

Field Optional

Zimbabwe

Post Code

Field Optional

Fixed Country Codes

Selected countries have a pre-defined single postal code for the entire region.

Country Name

Country Code

Postal Code

American Samoa

AS

96799

Anguilla

AI

AI-2640

Ascension Island

AC

ASCN 1ZZ

British Indian Ocean Territory

IO

BIQQ 1ZZ

Christmas Island

CX

6798

Cocos (Keeling) Islands

CC

6799

Falkland Islands

FK

FIQQ 1ZZ

Gibraltar

GI

GX11 1AA

Heard and McDonald Islands

HM

7151

Nauru

NR

NRU68

Niue

NU

9974

Norfolk Island

NF

2899

Pitcairn Islands

PN

PCRN 1ZZ

Saint Helena

SH

STHL 1ZZ

South Georgia and Sandwich

GS

SIQQ 1ZZ

Turks and Caicos Islands

TC

TKCA 1ZZ

Vatican

VA

00120

Digit Validations for Zip Codes

Country Name

Country Code

Validation Rules

Error Message

Afghanistan

AF

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Aland Islands

AX

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Algeria

DZ

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Bangladesh

BD

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Bhutan

BT

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Bosnia and Herzegovina

BA

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Cambodia

KH

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Cape Verde

CV

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Cuba

CU

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Dominican Republic

DO

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

El Salvador

SV

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Ethiopia

ET

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Faroe Islands

FO

Exactly 3 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 3 digits (e.g., 123).

Finland

FI

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

France

FR

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

France, Metropolitan

FX

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

French Guiana

GF

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

French Polynesia

PF

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Georgia

GE

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Germany

DE

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Greenland

GL

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Guadeloupe

GP

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Guam

GU

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Haiti

HT

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Honduras

HN

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Iran

IR

Exactly 10 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 10 digits (e.g., 1234567890).

Iraq

IQ

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Israel

IL

Exactly 7 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 7 digits (e.g., 1234567).

Italy

IT

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Jordan

JO

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Kazakhstan

KZ

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Kenya

KE

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Kyrgyzstan

KG

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Laos

LA

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Lebanon

LB

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1301).

Lesotho

LS

Exactly 3 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 3 digits (e.g., 123).

Liechtenstein

LI

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Lithuania

LT

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Madagascar

MG

Exactly 3 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 3 digits (e.g., 123).

Maldives

MV

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Marshall Islands

MH

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Martinique

MQ

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Mayotte

YT

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Micronesia

FM

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Moldova

MD

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Morocco

MA

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Mozambique

MZ

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Myanmar

MM

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Namibia

NA

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Nepal

NP

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

New Caledonia

NC

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 3 digits (e.g., 123).

Nicaragua

NI

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Niger

NE

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Nigeria

NG

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

North Macedonia

MK

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Northern Mariana Islands

MP

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Pakistan

PK

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Palau

PW

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Panama

PA

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Papua New Guinea

PG

Exactly 3 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 3 digits (e.g., 123).

Paraguay

PY

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Peru

PE

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Puerto Rico

PR

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Reunion

RE

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Saint Martin

MF

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Saint Pierre and Miquelon

PM

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

San Marino

SM

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Senegal

SN

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

South Korea

KR

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Spain

ES

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Sri Lanka

LK

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

St Barthélemy

BL

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Sudan

SD

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Svalbard and Jan Mayen

SJ

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Tajikistan

TJ

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Tanzania

TZ

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Tunisia

TN

Exactly 4 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 4 digits (e.g., 1234).

Turkmenistan

TM

Exactly 6 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 6 digits (e.g., 123456).

Uganda

UG

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Uruguay

UY

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Vietnam

VN

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Wallis and Futuna

WF

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Western Sahara

EH

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Zambia

ZM

Exactly 5 digits long. Contains only numbers. Has no spaces, letters, or extra characters.

Please enter a valid postal code with exactly 5 digits (e.g., 12345).

Complex Zip Validations

Country Name

Country Code

Validation Rules

Andorra

AD

  1. Start with 'A' or 'a'

  2. Followed by 'D' or 'd'

  3. Followed by exactly three digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be AD123, ad456, Ad789, and aD000.

Canada

CA

  1. Start with a letter

  2. Followed by a digit

  3. Followed by another letter

  4. Optionally followed by a space

  5. Followed by a digit

  6. Followed by another letter

  7. End with a digit

For example, valid codes would be A1B 2C3, a4d5E6, Z7y8X9, and m0N1o2.

Poland

PL

  1. Start with exactly two digits

  2. May or may not have a hyphen following the two digits

  3. Followed by exactly three digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 12-345, 67890, 23-456, and 01-234.

Japan

JP

  1. Start with exactly three digits

  2. May or may not have a hyphen following the three digits

  3. Followed by exactly four digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 123-4567, 8901234, 456-7890, and 0012345.

Greece

GR

  1. Start with exactly three digits

  2. May or may not have a space following the three digits

  3. Followed by exactly two digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 12345, 123 45, 67890, and 678 90.

Czechia

CZ

  1. Start with exactly three digits

  2. May or may not have a space following the three digits

  3. Followed by exactly two digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 12345, 123 45, 67890, and 678 90.

Sweden

SE

  1. Start with exactly three digits

  2. May or may not have a space following the three digits

  3. Followed by exactly two digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 12345, 123 45, 67890, and 678 90.

Portugal

PT

  1. Start with exactly four digits

  2. May or may not have a hyphen following the four digits

  3. Followed by exactly three digits

  4. And have no additional characters before or after this pattern

For example, valid codes would be 1234-567, 8901234, 5678-901, and 0000-123.

Netherlands

NL

  1. Start with exactly four digits

  2. May or may not have a space following the four digits

  3. Followed by exactly two letters (either uppercase or lowercase)

  4. And have no additional characters before or after this pattern

For example, valid codes would be 1234AB, 5678 cd, 9012XY, and 3456 ef.

Uzbekistan

UZ

  1. Consist of exactly six digits

  2. Have no additional characters before or after these six digits

For example, valid codes would be 123456, 654321, 000001, and 987654.

Ireland

IE

  1. Start with a letter from the specified ranges

  2. Followed by either two digits or the pattern 'D6W'/'d6w'

  3. May or may not have a space following this part

  4. Followed by exactly four alphanumeric characters

  5. And have no additional characters before or after this pattern

For example, valid codes would be A12ABCD, c6w 1234, H34ef56, and nD6Wabcd.

Complex Zip Code Validations with Error Messages

Country Name

Country Code

Validation Rule

Error Message

Argentina

AR

  • A simple 4-digit number.

  • Or one letter + four digits + optional space + three letters.

Examples:

  • A1234XYZ

  • B5678 ABC

  • Z0001DEF

Please enter a valid Argentine postal code. Use either 4 digits format (e.g., 1000) or CPA format (1 letter + 4 digits + 3 letters, e.g., C1000ABC)

Barbados

BB

  1. Starts with two letters: either uppercase “B” or lowercase “b” (e.g., “BB”, “bb”, “Bb”, or “bB”)

  2. Followed by exactly five digits (0–9)

Valid Examples:

  • BB12345

  • bb67890

  • Bb00001

  • bB54321

Please enter a valid Barbados postal code in the format: BB followed by 5 digits (e.g., BB11000)

Bermuda

BM

  1. Two letters (uppercase or lowercase)

  2. An optional space

  3. Two characters that can be either letters or numbers

Valid Examples:

  • AB12

  • xyZ9

  • CD 34 (note the space between the two parts)

  • ef G7

Please enter a valid Bermuda postal code in the format: 2 letters followed by 2 digits or letters (e.g., FL 04)

Brazil

BR

  1. Five digits, followed by three more digits

  2. The two parts may be separated by a hyphen, but the hyphen is optional

Valid Examples:

  • 12345678 (no hyphen)

  • 12345-678 (with hyphen)

Please enter a valid Brazilian postal code in the format NNNNN-NNN (e.g., 01001-000).

British Virgin Islands

VG

  1. Starts with the letter V or v

  2. Followed by the letter G or g

  3. Ends with exactly four digits

Valid Examples:

  • VG1234

  • vg0001

  • Vg5678

Please enter a valid postal code in the format: VG followed by 4 digits (e.g., VG1110).

Brunei Darussalam

BN

  1. Two letters (uppercase or lowercase)

  2. Followed by four digits

Valid Examples:

  • AB1234

  • xy0001

  • Hr2025

  • ZZ9999

Please enter a valid postal code in the format: 2 letters followed by 4 digits (e.g., BA1111)

Cayman Islands

KY

  1. Starts with the letters KY (case-insensitive: can be KY, ky, Ky, or kY)

  2. Followed by:

    • One digit

    • An optional hyphen (-)

    • Exactly four digits

Valid Examples:

  • KY11234

  • ky3-4567

  • Ky9-0001

  • kY74567

Please enter a valid postal code starting with 'KY' followed by 5 digits (e.g., KY4-0202 or KY40202).

Eswatini

SZ

  1. One letter (uppercase or lowercase)

  2. Followed by exactly three digits

Valid Examples:

  • A123

  • b456

  • Z789

  • m001

Please enter a valid postal code in the format: 1 letter followed by 3 digits (e.g., H100).

Guernsey

GG

  1. Starts with the letters GY (case-insensitive: can be GY, gy, Gy, or gY)

  2. Followed by 1 or 2 digits

  3. Then a single space

  4. Followed by:

    • One digit

    • Two letters (uppercase or lowercase)

Valid Examples:

  • GY1 2AB

  • gy12 3cd

  • Gy9 4XY

  • gY7 5mn

Please enter a valid Guernsey postal code (format: GY followed by numbers and letters, e.g., GY1 1AA).

Isle of Man

IM

  1. Starts with the letters IM (case-insensitive: can be IM, im, Im, or iM)

  2. Followed by 1 or 2 digits

  3. Then an optional space

  4. Followed by:

    • One digit

    • Two letters (uppercase or lowercase)

Valid Examples:

  • IM1 2AB

  • im12 3cd

  • Im9 4XY

  • iM7 5mn

  • IM12 3AB (with or without a space)

Please enter a valid Isle of Man postal code in the format: IM followed by numbers and letters (e.g., IM1 1AA).

Jersey

JE

  • Start with the letters "JE" or "je" (case-insensitive)

  • Be followed by a digit

  • Optionally include a space

  • Then another digit

  • And finally, exactly two letters (uppercase or lowercase)

Valid Examples:

  • JE3 7AB

  • je4Zx

  • Je9 2cd

Please enter a valid Jersey postal code in the fromat: JE followed by numbers and letters, e.g., JE1 1AA).

Malta

MT

Starts with exactly three letters, optionally followed by a space, and then exactly four digits.

Valid Examples:

  • ABC1234

  • abc 5678

  • XyZ0001

Please enter a valid postal code with three letters followed by four digits in one of the following formats: ATD1239 or ATD 1239.

Mauritius

MU

Exactly five characters long, starting with either a digit, an "A" or "a", or an "R" or "r", followed by four digits.

Valid Examples:

  • A1234

  • r5678

  • 91234

Please enter a valid postal code starting with a digit , 'A', or 'R', followed by four digits (e.g., A1234 or 51234).

Montserrat

MS

Exactly seven characters long, starting with the letters "MSR" (in any combination of uppercase or lowercase), followed by four digits.

  • MSR1234

  • msr0001

  • MsR9876

Please enter a valid postal code starting with 'MSR' followed by 4 digits (e.g., MSR1110).

Saint Kitts and Nevis

KN

Exactly six characters long, starting with the letters "KN" (in any combination of uppercase or lowercase), followed by four digits.

Valid Examples:

  • KN1234

  • kn0001

  • Kn9876

Please enter a valid postal code starting with 'KN' followed by 4 digits (e.g., KN0101)

Saint Lucia

LC

Start with the letters "LC" (in any combination of uppercase or lowercase), followed by two digits, an optional space, and then three more digits.

Valid Examples:

  • LC12 345

  • lc09 001

  • Lc77 999

  • LC12345 (no space, still valid)

Please enter a valid postal code starting with 'LC' followed by 5 digits (e.g., LC041010 or LC04 1010).

Slovakia

SK

Exactly three digits, optionally followed by a space, and then two more digits. The entire string must follow this format—no extra characters before or after.

Valid Examples:

  • 12345

  • 123 45

  • 007 89

Please enter a valid postal code of 5 digits in one of the following formats: NNNNN or NNN NN

Taiwan

TW

Exactly 3, 5, or 6 digits (0-9) —and nothing else. It allows only one of these three formats, with no letters, spaces, or special characters.

Valid Examples:

  • 123 (3 digits)

  • 45678 (5 digits)

  • 987654 (6 digits)

Please enter a valid Taiwan postal code with 3, 5, or 6 digits (e.g., 105, 40705, or 100600).

U.S. Virgin Islands

VI

Checks for a valid U.S. ZIP code—either the standard 5-digit format or the extended 9-digit format (ZIP+4), with or without a dash.

Valid Examples:

  • 90210 (standard ZIP code)

  • 12345-6789 (ZIP+4 with dash)

  • 123456789 (ZIP+4 without dash)

Please enter a valid ZIP code in the format: 5 digits or ZIP+4 (e.g., 00801 or 00801-1234).

United Kingdom

GB

Validates a UK postal code.

  1. One or two letters (the postcode area, e.g., "E" or "SW")

  2. One digit (the postcode district), (0-9)

  3. An optional letter or digit (some districts include a second character)

  4. An optional space (between the outward and inward parts)

  5. One digit (the start of the inward code)

  6. Exactly two letters (the end of the inward code)

Valid Examples:

  • SW1A 1AA

  • EC1A1BB

  • W1A 0AX

  • M1 1AE

Please enter a valid UK postcode (e.g., SW1A 1AA).

United States

US

Checks for a valid U.S. ZIP code—either the standard 5-digit format or the extended 9-digit format (ZIP+4), with or without a dash.

Valid Examples:

  • 90210 (standard ZIP code)

  • 12345-6789 (ZIP+4 with dash)

  • 123456789 (ZIP+4 without dash)

Please enter a valid U.S. ZIP code (5 digits or ZIP+4 format, e.g., 10001 or 12201-7050).