toxicdigital / vat-validator
Validate a VAT number against the official European Commission VIES VAT number validation SOAP service.
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/toxicdigital/vat-validator
Requires
- php: >=7.0.0
- ext-soap: *
This package is not auto-updated.
Last update: 2025-10-26 11:34:16 UTC
README
Validate a VAT number against the official European Commission VIES VAT number validation SOAP service.
Prerequisites
- PHP version 7 and above.
- php7.x-soap extension
How to install
composer require "toxicdigital/vat-validator"
How to use
use Toxic\Validator\Vat as VatValidator;
$validator = VatValidator::getInstance();
//Returns true or false
$validator->isValid("XY123456789");
//If VAT number is valid, company info is available
$validator->getCompany();
/*
* Toxic\Validator\Vat\Company Object
* (
* [name] => John Doe
* [address] => 123 Main St, Anytown, UK
* [vatNumber] => 100
* [countryCode] => GB
* [valid] => true
* )
*/