2017 © Pedro Peláez
 

library validate-vat-number

Validate a European VAT number using the EU commission VIES service

image

drawmyattention/validate-vat-number

Validate a European VAT number using the EU commission VIES service

  • Thursday, August 18, 2016
  • by drawmyattention
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3,009 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

Validate VAT Number

Validate a European VAT number using the EU commission VIES service., (*1)

Installation via Composer

"require": {
    "drawmyattention/validate-vat-number" : "1.*"
}

Usage

Check if a VAT number is valid

$validator = new ValidateVatNumber();

// True
$validator->validate('GB371057172')->isValid();

// False
$validator->validate('GB123452341678')->isValid();

Get the company name, address and country code

$validator = new ValidateVatNumber();

$validator->validate('GB371057172');

// Mcdonald's Restaurants Limited
$validator->company();

// Array of the company's address
$validator->address();

// GB
$validator->countryCode();

Get the full response from the api

$validator = new ValidateVatNumber();

$validator->validate('GB371057172');

// Full response object from the api
$validator->response();

The Versions

18/08 2016

dev-master

9999999-dev

Validate a European VAT number using the EU commission VIES service

  Sources   Download

MIT

The Development Requires

18/08 2016

1.0.0

1.0.0.0

Validate a European VAT number using the EU commission VIES service

  Sources   Download

MIT

The Development Requires