Country-specific ranges
configure valid postal code ranges per country (e.g., 110000-110099 for Delhi, 90001-90210 for Los Angeles)
ZIP/PIN Code Validation at Checkout - validate postal codes against configurable country-specific ranges before customers place an order. Ships with pre-loaded ranges for India, US, UK, Canada, Australia, and Europe, a full-featured admin grid, CSV/JSON import-export, and real...
Key Features:
Additional Services
Built-in from day one. No add-ons, no upsell, no licence keys to renew.
configure valid postal code ranges per country (e.g., 110000-110099 for Delhi, 90001-90210 for Los Angeles)
numeric ranges, alphanumeric patterns (UK, Canada), exact-match lists, and regex patterns
India, US, UK, Canada, Australia, and major European countries ready to go
either restrict to serviceable areas or block specific excluded ranges
The ZIP/PIN Code Validation extension for Magento 2 is a checkout postal-code gate for Magento 2 and Adobe Commerce that blocks orders from non-serviceable areas before payment. It validates ZIP and PIN codes against configurable country-specific ranges with real-time AJAX feedback during the shipping-address step.
Ten countries ship pre-loaded out of the box: India (all 28 states plus 8 union territories), United States (all 50 states plus DC), United Kingdom, Canada, Australia, Germany, France, Italy, Spain, and Netherlands. Range types cover numeric ranges, alphanumeric patterns for UK and Canada, exact-match lists, and regex. Validation runs in allow-list mode (only listed ranges accepted) or block-list mode (listed ranges rejected) per store view, so multi-country stores can enforce different rules per storefront.
The ZIP/PIN Code Validation extension for Magento 2 fires debounced AJAX requests (default 400 ms) to /panth_zipcode/validate/check, returning under 30 ms thanks to indexed lookups and per-country cache. Customers see "Sorry, we do not deliver to this area" inline the moment they finish typing, and the Place Order button stays disabled until the postcode clears. CSV and JSON bulk import handles 100K+ pincodes via CLI. Hyva (Alpine.js) and Luma (Knockout.js), Magento 2.4.4 - 2.4.8, PHP 8.1 - 8.4.
Best for:
The ZIP/PIN Code Validation extension for Magento 2 gates non-serviceable orders end-to-end:
Panth\Core\Helper\Theme detectionThe module ships with curated postal code range data for the following countries:
| Country | Format | Coverage |
|---|---|---|
| India | 6-digit PIN codes | All 28 states + 8 union territories |
| United States | 5-digit ZIP codes | All 50 states + DC |
| United Kingdom | Alphanumeric postcodes | England, Scotland, Wales, N. Ireland |
| Canada | Alphanumeric postal codes | All 10 provinces + 3 territories |
| Australia | 4-digit postcodes | All 6 states + 2 territories |
| Germany | 5-digit postleitzahl | Nationwide |
| France | 5-digit code postal | Nationwide |
| Italy | 5-digit CAP | Nationwide |
| Spain | 5-digit código postal | Nationwide |
| Netherlands | Alphanumeric postcodes | Nationwide |
You can enable, disable, override, or extend any country dataset from the admin grid.
Access the admin grid at Panth Infotech → Zipcode Validation → Ranges:
CSV format:
country_id,range_start,range_end,label,status
IN,110000,110099,Delhi,1
IN,400001,400099,Mumbai,1
US,90001,90210,Los Angeles,1
US,10001,10099,Manhattan,1
JSON format:
[
{"country_id": "IN", "range_start": "110000", "range_end": "110099", "label": "Delhi", "status": 1},
{"country_id": "US", "range_start": "90001", "range_end": "90210", "label": "Los Angeles", "status": 1}
]
Click Export → CSV or Export → JSON from the ranges grid. Current grid filters are respected, so you can export only the rows you care about.
When a customer types a postcode in the shipping address form, the storefront JS debounces keystrokes and fires an AJAX request to the validation endpoint (/panth_zipcode/validate/check). The server responds with either:
{"valid": true} — postcode is in a serviceable range{"valid": false, "message": "Sorry, we do not deliver to this area."} — postcode is invalid for the selected countryThe form shows an inline error under the postcode field and, if Block Checkout on Invalid is enabled, the "Next" / "Place Order" button is disabled until the customer enters a serviceable postcode.
Validation is theme-aware — on Hyva storefronts the module uses Alpine.js, on Luma it uses Knockout.js, detected via Panth\Core\Helper\Theme.
Ready to upgrade your Magento 2 checkout?
SEO Keywords: magento 2 zipcode validation, pin code validation, postal code validation, india pincode magento, delivery area validation, magento 2 checkout zipcode, magento 2 serviceable area, magento 2 pincode checker, magento 2 zip code restriction, magento 2 postcode validator, india pincode checkout magento, us zip validation magento, uk postcode checkout, canada postal code magento, australia postcode magento, european postcode validation, magento 2 ajax postcode, real-time zipcode check, magento 2 delivery restriction, courier serviceable pincode, magento 2 shipping restriction by pincode, panth zipcode validation, panth infotech, hire magento developer, top rated plus upwork, kishan savaliya magento, mage2kishan, mage2sk, magento marketplace developer, custom magento development india, magento 2 hyva development, magento 2.4.8 module, php 8.4 magento, magento 2 checkout optimization
| Requirement | Versions Supported |
|---|---|
| Magento Open Source | 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8 |
| Adobe Commerce | 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8 |
| Adobe Commerce Cloud | 2.4.4 — 2.4.8 |
| PHP | 8.1.x, 8.2.x, 8.3.x, 8.4.x |
| MySQL | 8.0+ |
| MariaDB | 10.4+ |
| Hyva Theme | 1.0+ |
| Luma Theme | Native support |
| Required dependency | mage2kishan/module-core (free) |
composer require mage2kishan/module-zipcode-validation
bin/magento module:enable Panth_Core Panth_ZipcodeValidation
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
app/code/Panth/ZipcodeValidation/Panth_Core is also installed (required dependency)bin/magento module:status Panth_ZipcodeValidation
# Expected output: Module is enabled
After installation, navigate to:
Admin → Panth Infotech → Zipcode Validation
Admin → Stores → Configuration → Panth Extensions → Zipcode Validation
Settings live under Stores → Configuration → Panth Extensions → Zipcode Validation:
| Setting | Default | Description |
|---|---|---|
| Enable Module | Yes | Master toggle for all zipcode validation |
| Validation Mode | Allow-list | Allow-list (only listed ranges accepted) or Block-list (listed ranges rejected) |
| Enabled Countries | India, US, UK, CA, AU | Which country datasets to activate for the current store |
| Real-time AJAX Validation | Yes | Validate postcodes as the customer types at checkout |
| AJAX Debounce (ms) | 400 | Delay before firing AJAX validation request |
| Error Message | "Sorry, we do not deliver to this area." | Default message shown on invalid postcode |
| Block Checkout on Invalid | Yes | Prevent customers from proceeding if postcode is out of range |
| Validate Address Book | Yes | Also validate postcodes when customers save new addresses |
| Module Category | Cart & Checkout |
|---|---|
| Best For | All Sizes |
Talk to Kishan directly — written quote, scope and timeline within 24 hours. No sales call.
ZIP/PIN Code Validation at Checkout for Magento 2