PHPackages                             elvenpath/yii2-eu-vatvalidator - 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. elvenpath/yii2-eu-vatvalidator

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

elvenpath/yii2-eu-vatvalidator
==============================

Yii2 validator for EU VAT numbers

v1.1(10y ago)210.3k↓31.3%1MITPHPPHP &gt;=5.3.0

Since Mar 15Pushed 9y agoCompare

[ Source](https://github.com/elvenpath/yii2-eu-vatvalidator)[ Packagist](https://packagist.org/packages/elvenpath/yii2-eu-vatvalidator)[ Docs](https://github.com/elvenpath/yii2-eu-vatvalidator)[ RSS](/packages/elvenpath-yii2-eu-vatvalidator/feed)WikiDiscussions master Synced 1mo ago

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

An Yii2 validator for EU VAT numbers

EU VAT validator for Yii2
=========================

[](#eu-vat-validator-for-yii2)

[![Latest Stable Version](https://camo.githubusercontent.com/437768281c025e864ca148b13d58ad7b2f8be2501d33861e570e5bc58edc57f5/68747470733a2f2f706f7365722e707567782e6f72672f656c76656e706174682f796969322d65752d76617476616c696461746f722f762f737461626c65)](https://packagist.org/packages/elvenpath/yii2-eu-vatvalidator)[![Total Downloads](https://camo.githubusercontent.com/43150e9f9821252eaa046a038cf44b3c92c08a8d3c14933e69f6d295020b4914/68747470733a2f2f706f7365722e707567782e6f72672f656c76656e706174682f796969322d65752d76617476616c696461746f722f646f776e6c6f616473)](https://packagist.org/packages/elvenpath/yii2-eu-vatvalidator)[![License](https://camo.githubusercontent.com/6fe591ce74b5e9c4801baee9cfc40fbe4ab16b1d0328d488eb7587550f9a431c/68747470733a2f2f706f7365722e707567782e6f72672f656c76656e706174682f796969322d65752d76617476616c696461746f722f6c6963656e7365)](https://packagist.org/packages/elvenpath/yii2-eu-vatvalidator)

based on

About
-----

[](#about)

The

- Validate a VAT number
- Retrieve information like the name or the address of the company

The data is extracted from a European Commission webservice

**It ONLY works for European Union countries**

Requirements
------------

[](#requirements)

PHP with Soap enabled

Install
-------

[](#install)

```
composer require elvenpath/yii2-eu-vatvalidator

```

Usage
-----

[](#usage)

```
public function rules()
{
    return [
        [
            'vat',
            EuVatValidator::className(),
            'country_code' => $this->country_code,
        ],
    ];
}

```

You can also populate the model with the company name and address got from the EU database

```
public function rules()
{
    return [
        [
            'vat',
            EuVatValidator::className(),
            'country_code' => $this->country_code,
            'populate_model' => true,
            'model_name_attribute' => 'name',
            'model_address_attribute' => 'address'
        ],
    ];
}

```

Disclaimer
----------

[](#disclaimer)

Take a look at [http://ec.europa.eu/taxation\_customs/vies/viesdisc.do](http://ec.europa.eu/taxation_customs/vies/viesdisc.do) to know when/how you're allowed to use this service and his information

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3710d ago

### Community

Maintainers

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

---

Top Contributors

[![elvenpath](https://avatars.githubusercontent.com/u/1319068?v=4)](https://github.com/elvenpath "elvenpath (14 commits)")

---

Tags

validatoryii2vat

### Embed Badge

![Health badge](/badges/elvenpath-yii2-eu-vatvalidator/health.svg)

```
[![Health](https://phpackages.com/badges/elvenpath-yii2-eu-vatvalidator/health.svg)](https://phpackages.com/packages/elvenpath-yii2-eu-vatvalidator)
```

###  Alternatives

[paulzi/yii2-json-behavior

Yii2 json attribute behavior

76528.6k3](/packages/paulzi-yii2-json-behavior)[codeonyii/yii2-at-least-validator

Validates at least one (or more) attributes.

28253.5k1](/packages/codeonyii-yii2-at-least-validator)[arogachev/yii2-many-to-many

Many-to-many ActiveRecord relation for Yii 2 framework

3541.2k4](/packages/arogachev-yii2-many-to-many)[kdn/yii2-domain-validator

Domain name validator for Yii 2.

11122.3k1](/packages/kdn-yii2-domain-validator)[dstotijn/yii2-json-schema-validator

A Yii2 extension that provides a validator class for JSON Schema validation.

1730.7k](/packages/dstotijn-yii2-json-schema-validator)[insolita/yii2-array-structure-validator

Validate array with complex structure

1326.4k2](/packages/insolita-yii2-array-structure-validator)

PHPackages © 2026

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