PHPackages                             matusstafura/magento2-vatid-validation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. matusstafura/magento2-vatid-validation

ActiveMagento2-module[Payment Processing](/categories/payments)

matusstafura/magento2-vatid-validation
======================================

Vat Id input validation for Magento 2

v0.2.0(9mo ago)111MITJavaScriptPHP &gt;=8.1

Since Aug 2Pushed 9mo agoCompare

[ Source](https://github.com/matusstafura/magento2-vatid-validation)[ Packagist](https://packagist.org/packages/matusstafura/magento2-vatid-validation)[ RSS](/packages/matusstafura-magento2-vatid-validation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

🧾 Magento 2 VAT ID Validation
=============================

[](#-magento-2-vat-id-validation)

A lightweight module that adds client-side **VAT ID validation** to key Magento 2 forms like checkout and customer address forms. This is helpful for EU country based commerce, that needs to verify VAT ID via VIES.

---

📋 Description
-------------

[](#-description)

Magento 2 by default allows invalid or incorrectly formatted VAT IDs during checkout, which can lead to customer entry errors and issues with tax/VAT compliance like VIES check.

This module adds **smart VAT ID validation per country**, using patterns based on the official EU formats.

  **Default Magento 2 behavior:**
[![before validation](./docs/before.jpg)](./docs/before.jpg) **With this module enabled:**
[![after validation](./docs/after.jpg)](./docs/after.jpg) ### ✅ Features

[](#-features)

- Validates VAT ID format based on the selected country
- Works on:
    - 🛒 Checkout (shipping &amp; billing addresses)
- Translation-ready (`i18n/sk_SK.csv` and `%1` placeholders supported)
- Fully frontend (JS-based) — no backend override

---

📦 Installation
--------------

[](#-installation)

### Option 1: Composer (Recommended)

[](#option-1-composer-recommended)

```
composer require matusstafura/magento2-vatid-validation
```

### Option 2: Manual Installation (for testing or customization)

[](#option-2-manual-installation-for-testing-or-customization)

```
git clone https://github.com/matusstafura/magento2-vatid-validation.git app/code/MatusStafura/VatIdValidation
```

Then run:

```
bin/magento module:enable MatusStafura_VatIdValidation
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

🚀 TODO
------

[](#-todo)

- ⏳ Option to override per store (via admin config)

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome!

1. Fork the repo
2. Create a new branch:

```
git checkout -b feature/your-feature-name
```

3. Make your changes
4. Push to your fork:

```
git push origin feature/your-feature-name
```

5. Open a pull request

---

📃 License
---------

[](#-license)

MIT

---

☕ Support
---------

[](#-support)

If you find this module helpful:

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/matusstafura)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance57

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

282d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f56918987521c7c4b77e80e82275ef0ee2be4567bf65f207237f788524938f88?d=identicon)[matusstafura](/maintainers/matusstafura)

---

Top Contributors

[![matusstafura](https://avatars.githubusercontent.com/u/11353888?v=4)](https://github.com/matusstafura "matusstafura (3 commits)")

---

Tags

magento2magento2-extensionmagento2-modulevat-validationvatid-checkingviesvalidationmagentomoduleformcheckoutmagento2VAT IDcustomer

### Embed Badge

![Health badge](/badges/matusstafura-magento2-vatid-validation/health.svg)

```
[![Health](https://phpackages.com/badges/matusstafura-magento2-vatid-validation/health.svg)](https://phpackages.com/packages/matusstafura-magento2-vatid-validation)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
