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

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

cba85/eu-vat-validation
=======================

A PHP component to verify the validity of a VAT number issued by any European Union Member State

32.7k2PHPCI failing

Since Apr 29Pushed 4y ago3 watchersCompare

[ Source](https://github.com/cba85/eu-vat-validation)[ Packagist](https://packagist.org/packages/cba85/eu-vat-validation)[ RSS](/packages/cba85-eu-vat-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

European VAT number validation
==============================

[](#european-vat-number-validation)

A PHP package to verify the validity of a VAT number issued by any European Union Member State.

This package is basically calling web service provided by VIES for VAT number validation.

VIES API documentation : [http://ec.europa.eu/taxation\_customs/vies/checkVatService.wsdl](http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl)

This package allows you to :

- validate a VAT number
- retrieve information like the name or the address of the company

What is a VAT number?
---------------------

[](#what-is-a-vat-number)

A value added tax identification number or VAT identification number (VATIN) is an identifier used in many countries, including the countries of the European Union, for value added tax purposes.

Installation
------------

[](#installation)

Install using Composer :

```
$ composer require cba85/eu-vat-validation dev-master

```

You must have PHP with Soap enabled.

Usage
-----

[](#usage)

```
$vatValidation = new Validation('FR12345678910');

/*
 * Check VAT
 */
$vat = $vatValidation->checkVat();

/*
 * Is VAT ID valid ?
 */
$valid = $vatValidation->isValid();
```

You'll find more examples in the `example` folder.

Returns
-------

[](#returns)

### Check VAT

[](#check-vat)

```
Array (
    [countryCode] => FR
    [vatNumber] => 12345678910
    [requestDate] => 2016-12-19+01:00
    [valid] =>
    [name] => ---
    [address] => ---
)
```

### Check VAT approx.

[](#check-vat-approx)

```
Array(
	[countryCode] => FR
    [vatNumber] => 12345678910
    [requestDate] => 2016-12-19+01:00
    [valid] =>
    [traderName] => ---
    [traderCompanyType] => ---
    [traderAddress] => ---
    [requestIdentifier] =>
)
```

Tests
-----

[](#tests)

If TVA rates evolve, change the results expected.

```
$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ValidationTest
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![cba85](https://avatars.githubusercontent.com/u/720547?v=4)](https://github.com/cba85 "cba85 (15 commits)")[![BramEsposito](https://avatars.githubusercontent.com/u/168336?v=4)](https://github.com/BramEsposito "BramEsposito (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

countriesphptaxvat-numberverifyvie

### Embed Badge

![Health badge](/badges/cba85-eu-vat-validation/health.svg)

```
[![Health](https://phpackages.com/badges/cba85-eu-vat-validation/health.svg)](https://phpackages.com/packages/cba85-eu-vat-validation)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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