ddeboer/vatin

Validate VAT identification numbers

Maintainers

Details

github.com/ddeboer/vatin

Source

Issues

Fund package maintenance!
ddeboer

Installs: 616 060

Dependents: 6

Suggesters: 2

Security: 0

Stars: 114

Watchers: 11

Forks: 29

Open Issues: 2

2.2.2 2020-12-22 11:40 UTC

This package is auto-updated.

Last update: 2020-12-22 13:39:13 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version

A small PHP library for validating VAT identification numbers (VATINs).

Installation

This library is available on Packagist:

$ composer require ddeboer/vatin

If you want to use this library in a Symfony application, you can use the VatinBundle instead.

Usage

Validate a VAT number’s format:

use Ddeboer\Vatin\Validator;

$validator = new Validator;
$bool = $validator->isValid('NL123456789B01');

Additionally check whether the VAT number is in use, with a call to the VAT Information Exchange System (VIES) SOAP web service:

use Ddeboer\Vatin\Validator;

$validator = new Validator;
$bool = $validator->isValid('NL123456789B01', true);