Skip to content

ddeboer/vatin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 27, 2025
5864e9a · Feb 27, 2025

History

71 Commits
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Oct 6, 2012
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025

Repository files navigation

VATIN

Packagist 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);