Skip to content
/ vatin Public
forked from ddeboer/vatin

Validate VAT identification numbers

License

Notifications You must be signed in to change notification settings

wepika/vatin

 
 

Repository files navigation

VATIN

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version

A small PHP library for validating VAT identification numbers (VATINs).

Installation

To use this fork

Add this into repositories in your composer.json

{
  "type": "package",
  "package": {
    "name": "wepika/vatin",
    "version": "dev-master",
    "source": {
      "url": "https://github.com/wepika/vatin.git",
      "type": "git",
      "reference": "master"
    },
    "autoload": {
      "classmap": [""]
    }
  }
}

To use the original lib

This library is available on Packagist:

$ composer require ddeboer/vatin

If you want to use this library in a Symfony application, you can use the VatinBundle instead.

Usage

Validate a VAT number’s format:

use Ddeboer\Vatin\Validator;

$validator = new Validator;
$bool = $validator->isValid('NL123456789B01');

Additionally check whether the VAT number is in use, with a call to the VAT Information Exchange System (VIES) SOAP web service:

use Ddeboer\Vatin\Validator;

$validator = new Validator;
$bool = $validator->isValid('NL123456789B01', true);

About

Validate VAT identification numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%