PHP Class IsoCodes\Vat

See also: http://ec.europa.eu/taxation_customs/vies/faq.html
Inheritance: implements isocodes\IsoCodeInterface
Show file Open project: ronanguilloux/isocodes Class Usage Examples

Public Properties

Property Type Description
$patterns array Regular expression patterns per country code.

Public Methods

Method Description
isValidCountryCode ( string $vat ) : boolean Returns true if value is valid country code, false otherwise.
validate ( mixed $vat ) : boolean validate Checks if $vat is a valid, European Union VAT number.

Method Details

isValidCountryCode() public static method

Returns true if value is valid country code, false otherwise.
public static isValidCountryCode ( string $vat ) : boolean
$vat string
return boolean

validate() public static method

validate Checks if $vat is a valid, European Union VAT number.
public static validate ( mixed $vat ) : boolean
$vat mixed
return boolean

Property Details

$patterns public static property

Regular expression patterns per country code.
public static array $patterns
return array