This is a simple yet modern PHP library to validate VAT numbers.
The API is overall simple and returns a true
or false
boolean.
In order to use this library, you simply need to import and initialize the VatNumberValidator
class.
Then just call the validate
method and pass the VAT number you want to validate as it's sole argument.
<?php
use Eufaturo\VatNumberValidator\VatNumberValidator;
$validator = new VatNumberValidator();
$isValid = $validator->validate(
vatNumber: 'PT100000010',
);
This library is installed via Composer and to install, run the following command.
composer require eufaturo/vat-number-validator
composer test
Thank you for your interest. Here are some of the many ways to contribute.
- Check out our contributing guide
- Look at our code of conduct
This library is open-sourced software licensed under the MIT license.
This library was inspired by https://github.com/antalaron/vat-number-validator.