toxicdigital / vat-validator
Validate a VAT number against the official European Commission VIES VAT number validation SOAP service.
v1.1-stable
2018-02-18 10:10 UTC
Requires
- php: >=7.0.0
- ext-soap: *
This package is not auto-updated.
Last update: 2025-06-08 09:27:04 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 * ) */