itemvirtual / vat-validate
Validate European VAT numbers
1.0.2
2023-12-22 15:48 UTC
Requires
- php: ^7.4|^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-12-22 17:58:23 UTC
README
Laravel package
Installation
You can install the package via composer:
composer require itemvirtual/vat-validate
Usage
Use the VatValidate
Facade for all methods
use Itemvirtual\VatValidate\Facades\VatValidate;
· Validate Spanish NIF, NIE, CIF
VatValidate::checkSpanishVat($vat);
or you can do it for a specific type of document
VatValidate::checkNif($vat); VatValidate::checkNie($vat); VatValidate::checkSpecialNie($vat); VatValidate::checkCif($vat);
· Validate European VAT
VatValidate::checkEuropeanVat($vat, $countryCode);
· VIES Validation
VatValidate::checkVies($vat, $countryCode);
· Helper methods
Get VAT number formatted with country code
VatValidate::getFullFormatedVat($vat, $countryCode);
Info
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.