PHPackages                             hansdeboeck/laravel-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. hansdeboeck/laravel-vat-validator

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

hansdeboeck/laravel-vat-validator
=================================

EU VAT (BTW) validator for Laravel — VIES with automatic fallbacks (controleerbtwnummer.eu, btw-opzoeken.be), 24h cache, address parsing.

v1.0.0(2mo ago)0883MITPHPPHP ^8.2

Since Apr 26Pushed 2mo agoCompare

[ Source](https://github.com/hansdeboeck/laravel-vat-validator)[ Packagist](https://packagist.org/packages/hansdeboeck/laravel-vat-validator)[ RSS](/packages/hansdeboeck-laravel-vat-validator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

laravel-vat-validator
=====================

[](#laravel-vat-validator)

EU BTW-nummer validatie voor Laravel. VIES als primaire bron met automatische fallbacks naar `controleerbtwnummer.eu` en `btw-opzoeken.be`. Cached, geretry'd, met adres-parsing.

Installatie
-----------

[](#installatie)

Lokaal (path-repository) — voeg toe aan je app's `composer.json`:

```
{
    "require": {
        "hansdeboeck/laravel-vat-validator": "*"
    },
    "repositories": [
        { "type": "path", "url": "../laravel-vat-validator" }
    ]
}
```

Daarna:

```
composer require hansdeboeck/laravel-vat-validator:*
php artisan vendor:publish --tag=vat-validator-config   # optioneel
```

Gebruik
-------

[](#gebruik)

```
use HansDeBoeck\VatValidator\VatValidator;

$result = app(VatValidator::class)->lookup('BE0405622220');

if ($result->valid) {
    echo $result->name;                     // "ALDI HOLDING NV"
    echo $result->vatNumber;                // "BE0405622220"
    echo $result->countryCode;              // "BE"
    echo $result->source;                   // "vies" | "cbw" | "btwo"
    echo $result->address?->street;
    echo $result->address?->zipCode;
    echo $result->address?->city;
} else {
    echo $result->error;
}
```

### Validation rule

[](#validation-rule)

```
$request->validate([
    'vat' => ['required', 'vat'],
]);
```

Vraagt VIES om de input te valideren — dezelfde semantiek als `lookup()`.

### Array access (legacy)

[](#array-access-legacy)

Het result-object implementeert `ArrayAccess`, zodat code die een array verwachtte blijft werken:

```
$result['valid'];
$result['vat_number'];
$result['address']['city'];
```

Configuratie
------------

[](#configuratie)

[`config/vat-validator.php`](config/vat-validator.php):

KeyDefaultDoel`cache_ttl`86400 (24u)Hoe lang positieve lookups gecached worden`cache_enabled`trueVoor tests/debug uit te zetten`cache_prefix``vat:`Wijzig om bestaande cache te invalideren`http_timeout`6sPer HTTP-request, niet onder 5`fallbacks_enabled`trueSchakel niet-VIES bronnen uitOverride via env: `VAT_VALIDATOR_CACHE_TTL`, `VAT_VALIDATOR_FALLBACKS`, etc.

Bronnen
-------

[](#bronnen)

1. **VIES (EU)** — `https://ec.europa.eu/taxation_customs/vies/rest-api/...` — primaire bron, retried 2× met 200ms.
2. **controleerbtwnummer.eu** — fallback voor alle EU-landen wanneer VIES geen antwoord geeft.
3. **btw-opzoeken.be** — laatste redmiddel, alleen voor BE-nummers.

Negatieve lookups worden niet gecached (zodat een net geactiveerd BTW-nummer niet 24u onbruikbaar blijft).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance82

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dc1f3a840d7cb68140b6c2d5a1ffd06dc2bcfd223c3473f56d7d8559d842c90?d=identicon)[hansdeboeck](/maintainers/hansdeboeck)

---

Top Contributors

[![hansdeboeck](https://avatars.githubusercontent.com/u/3226092?v=4)](https://github.com/hansdeboeck "hansdeboeck (2 commits)")

---

Tags

laravelvalidatorvatviesbtwBelgium

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

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