PHPackages                             drawmyattention/validate-vat-number - 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. drawmyattention/validate-vat-number

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

drawmyattention/validate-vat-number
===================================

Validate a European VAT number using the EU commission VIES service

1.0.0(9y ago)03.7k1[1 PRs](https://github.com/amochohan/validate-vat-number/pulls)MITPHP

Since Aug 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/amochohan/validate-vat-number)[ Packagist](https://packagist.org/packages/drawmyattention/validate-vat-number)[ RSS](/packages/drawmyattention-validate-vat-number/feed)WikiDiscussions master Synced 3w ago

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

Validate VAT Number
===================

[](#validate-vat-number)

Validate a European VAT number using the EU commission VIES service.

Installation via Composer
-------------------------

[](#installation-via-composer)

```
"require": {
    "drawmyattention/validate-vat-number" : "1.*"
}

```

Usage
-----

[](#usage)

### Check if a VAT number is valid

[](#check-if-a-vat-number-is-valid)

```
$validator = new ValidateVatNumber();

// True
$validator->validate('GB371057172')->isValid();

// False
$validator->validate('GB123452341678')->isValid();

```

### Get the company name, address and country code

[](#get-the-company-name-address-and-country-code)

```
$validator = new ValidateVatNumber();

$validator->validate('GB371057172');

// Mcdonald's Restaurants Limited
$validator->company();

// Array of the company's address
$validator->address();

// GB
$validator->countryCode();

```

### Get the full response from the api

[](#get-the-full-response-from-the-api)

```
$validator = new ValidateVatNumber();

$validator->validate('GB371057172');

// Full response object from the api
$validator->response();

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3599d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a8a6d7576ffbce954cdfe28b99409f1575f9ebea23ece6e6bd0498e0d5d9159?d=identicon)[drawmyattention](/maintainers/drawmyattention)

---

Top Contributors

[![amochohan](https://avatars.githubusercontent.com/u/2978619?v=4)](https://github.com/amochohan "amochohan (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drawmyattention-validate-vat-number/health.svg)

```
[![Health](https://phpackages.com/badges/drawmyattention-validate-vat-number/health.svg)](https://phpackages.com/packages/drawmyattention-validate-vat-number)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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