PHPackages                             davidvandertuijn/vat-validator - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. davidvandertuijn/vat-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

davidvandertuijn/vat-validator
==============================

VAT Validator

1.1(1y ago)061MITPHPPHP &gt;=7.0.0

Since Oct 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/davidvandertuijn/vat-validator)[ Packagist](https://packagist.org/packages/davidvandertuijn/vat-validator)[ RSS](/packages/davidvandertuijn-vat-validator/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

VAT Validator
=============

[](#vat-validator)

[![Total Downloads](https://camo.githubusercontent.com/828d3a44a2a064d8f485bf0e601fd6eee40c2ad08f26e9b8e6b607159c345ac4/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f7661742d76616c696461746f722f642f746f74616c2e737667)](https://packagist.org/packages/davidvandertuijn/vat-validator)[![Latest Stable Version](https://camo.githubusercontent.com/616771bbf038db8272d2bad0d5d287a896ee4f4dc025ac4cbc8dcf1ec1f2dfbc/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f7661742d76616c696461746f722f762f737461626c652e737667)](https://packagist.org/packages/davidvandertuijn/vat-validator)[![License](https://camo.githubusercontent.com/a58d41ef9e03b3a625eaa608cc6f9e1db6e2646ef5757e973946eeabcbf70cdd/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f7661742d76616c696461746f722f6c6963656e73652e737667)](https://packagist.org/packages/davidvandertuijn/vat-validator)

[![VAT Validator](https://camo.githubusercontent.com/1d532ec7083737387cd7626e6cae17a55fde722e310564c16c84a0792d3b5f6b/68747470733a2f2f63646e2e646176696476616e6465727475696a6e2e6e6c2f6769746875622f7661742d76616c696461746f722e706e67)](https://camo.githubusercontent.com/1d532ec7083737387cd7626e6cae17a55fde722e310564c16c84a0792d3b5f6b/68747470733a2f2f63646e2e646176696476616e6465727475696a6e2e6e6c2f6769746875622f7661742d76616c696461746f722e706e67)

This VAT Number Validation library allows users to verify VAT numbers with high accuracy by leveraging both regular expressions and the VIES (VAT Information Exchange System) service. This dual-layer validation ensures that VAT numbers are correctly formatted and legally valid within the European Union.

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

Install
-------

[](#install)

```
composer require davidvandertuijn/vat-validator
```

Usage
-----

[](#usage)

```
use Davidvandertuijn\VatValidator\Validator as VatValidator;
```

```
$vatValidator = new VatValidator;

$vatValidator->validate('NL821783981B01'); // true

if ($vatValidator->isValid()) {
    $metaData = $vatValidator->getMetaData();
}
```

```
[
    "name" => "FLORO WEBDEVELOPMENT B.V.",
    "address" => "WESTBLAAK 00180 3012KN ROTTERDAM"
]
```

Strict
------

[](#strict)

In this VAT Number Validation library, when strict mode is set to FALSE, the validation process is more flexible, especially in scenarios where the VIES (VAT Information Exchange System) service is temporarily unavailable. In such cases, the validation will return TRUE, allowing the workflow to continue without disruption due to service timeouts or SOAP errors.

```
$vatValidator->setStrict(false); // default = true
```

Cache
-----

[](#cache)

To optimize the validation process and reduce the dependency on the VIES (VAT Information Exchange System) service, we recommend caching valid VAT numbers within your application. This approach minimizes repeated requests to the VIES service and improves overall performance.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity11

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 ~0 days

Total

2

Last Release

640d ago

PHP version history (2 changes)1.1PHP &gt;=7.0.0

v1.0.1PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8904bedce7fb2ec131c0d18c13aeaa82b00af2fd03ebe099886ac462b1d29e?d=identicon)[davidvandertuijn](/maintainers/davidvandertuijn)

---

Top Contributors

[![davidvandertuijn](https://avatars.githubusercontent.com/u/11010507?v=4)](https://github.com/davidvandertuijn "davidvandertuijn (7 commits)")

### Embed Badge

![Health badge](/badges/davidvandertuijn-vat-validator/health.svg)

```
[![Health](https://phpackages.com/badges/davidvandertuijn-vat-validator/health.svg)](https://phpackages.com/packages/davidvandertuijn-vat-validator)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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