2017 © Pedro Peláez
 

library yii2-eu-vatvalidator

Yii2 validator for EU VAT numbers

image

elvenpath/yii2-eu-vatvalidator

Yii2 validator for EU VAT numbers

  • Saturday, July 16, 2016
  • by elvenpath
  • Repository
  • 1 Watchers
  • 1 Stars
  • 945 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 32 % Grown

The README.md

An Yii2 validator for EU VAT numbers, (*1)

EU VAT validator for Yii2

Latest Stable Version Total Downloads License, (*2)

based on https://github.com/herdani/vat-validation, (*3)

About

The - Validate a VAT number - Retrieve information like the name or the address of the company, (*4)

The data is extracted from a European Commission webservice, (*5)

It ONLY works for European Union countries, (*6)

Requirements

PHP with Soap enabled, (*7)

Install

composer require elvenpath/yii2-eu-vatvalidator

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, (*8)

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

Disclaimer

Take a look at http://ec.europa.eu/taxation_customs/vies/viesdisc.do to know when/how you're allowed to use this service and his information, (*9)

The Versions

16/07 2016

dev-master

9999999-dev https://github.com/elvenpath/yii2-eu-vatvalidator

Yii2 validator for EU VAT numbers

  Sources   Download

MIT

The Requires

 

yii2 validator vat

15/03 2016

v1.1

1.1.0.0 https://github.com/elvenpath/yii2-eu-vatvalidator

Yii2 validator for EU VAT numbers

  Sources   Download

MIT

The Requires

 

yii2 validator vat