Checkout Shipping Address Validation for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
Description / Checkout Shipping Address Validation for Magento 2
MAGENTO 2 · CHECKOUT · ADDRESS · DIAGNOSTICS
Help customers correct their details during checkout.
Kowal Checkout Address Validation
Check email syntax and phone and postal code formats, and show NIP/VAT warnings. Separate blocking frontend validation from backend log-only diagnostics.
Country rules · NIP/VAT warnings · Logs without full data
HOW IT WORKS IN PRACTICE
01 · Enable the appropriate mechanisms
Configure the frontend and log-only diagnostics independently.
02 · Customers complete their address
Messages indicate incorrectly formatted fields.
03 · Analyze diagnostics
The backend records violations without blocking sales.
How does your store benefit?
Explore the module's features, use cases, and settings.
Address and customer detail validation in Magento 2 checkout
Magento 2 Checkout Address Validation reduces errors in data entered when placing an order. It checks email, phone, postal code and NIP/VAT and gives customers clear feedback before incorrect details reach fulfillment.
This means fewer manual corrections for customer service, logistics and accounting, and less risk of shipping and sales document problems.
Email and phone
Checks email syntax and a simple phone number format with an optional + sign.
Postal codes
Country-specific rules for Poland, Germany, Czechia, Slovakia and the USA.
NIP / VAT
Nonblocking warnings, country rules and checksum verification for Polish NIP.
Validate customer details while protecting checkout
The frontend can stop obviously incorrect values and indicate the field to correct. Backend diagnostics run in log-only mode, so detecting a problem should not block checkout, APIs or address saving.
Key features
- email validation and blocking spaces,
- phone format checks,
- country-specific postal code validation,
- PL, DE, CZ, SK and US postal code support,
- NIP/VAT warnings and Polish NIP checksum verification,
- VAT rules for countries including DE, ES, FR and IT,
- configuration in Magento Admin,
- backend log-only diagnostics.
FAQ
Does the module block an incorrect postal code?
Frontend validation can prevent proceeding and show customers the details that need correcting.
Which countries have postal code rules?
Poland, Germany, Czechia, Slovakia and the USA.
Does it check Polish NIP?
Yes, including the checksum; NIP/VAT messages are nonblocking.
Can the backend block an order?
Backend diagnostics run in log-only mode to avoid interrupting sales.
Two independent switches
Stores → Configuration → Sales → Checkout → Checkout Address Validation provides Enable Frontend Validation and Enable Backend Log-Only Diagnostics. Both mechanisms are enabled by default.
The frontend checks the standard shipping address form, including a guest's email. The backend records violations diagnostically without rejecting checkout, APIs or address saving because of them.
Format checks and validation scope
The phone number can contain digits and an optional leading +. Postal codes are checked against PL, DE, CZ, SK and US country configuration; validation rejects whitespace.
NIP/VAT receives format and prefix warnings and, for Polish NIP, checksum warnings. The module does not confirm an address exists, that a mailbox or phone number works, or tax registration in external registries.
Diagnostics and custom checkout
The backend log includes the field name, violated rule, country, value length, Store ID and a hashed cart identifier. These diagnostic records do not store full customer values.
Frontend integration uses standard Magento checkout components and RequireJS. With Hyvä or an alternative checkout, check how the rules are connected; the package does not include a dedicated Hyvä adapter.
Installation via Composer
Package kowal/module-checkout-validation, module Kowal_CheckoutValidation. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment in accordance with the store's deployment process.
From configuration to results
1. Enable the appropriate mechanisms
Configure the frontend and log-only diagnostics independently.
2. Customers complete their address
Messages indicate incorrectly formatted fields.
3. Analyze diagnostics
The backend records violations without blocking sales.
A typo detected before shipping
The customer enters an email containing a space or a phone number with disallowed characters. Checkout indicates the field to correct.
The NIP/VAT warning remains nonblocking. The backend lets you analyze format problems without interrupting address saving or the order process.
Organize data validation in your checkout
Want to tailor the module to your store? Ask about implementing Kowal Checkout Address Validation and discuss the configuration or any extensions you need.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Questions and Answers
Which fields does the module validate?
Is the module suitable for Adobe Commerce?
Which countries have dedicated postcode rules?
Does the module validate Polish NIP tax IDs?
Does validation also run on the backend?
Module Installation Instructions
Installation via Composer
You will receive the access details for the Composer repository, the customer's email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.
composer config repositories.kowal composer https://repo.kowal.store
composer config http-basic.repo.kowal.store "TWOJ_EMAIL_KLIENTA" "TWOJ_TOKEN"
composer require kowal/module-checkout-validation
Completing the installation
After installing the package, run the Magento update and clear the cache:
php bin/magento setup:upgrade
php bin/magento cache:flush
In a production environment, also run DI compilation and deploy static files according to your store deployment process.