category OSS
package OSS_Validate
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Validates a given tax / VAT / PAYE number for the correct format.

isValid(string $value) : \boo

This includes number and position of letters / digits and MOD23.

link http://www.iecomputersystems.com/ordering/eu_vat_numbers.htm
link http://www.braemoor.co.uk/software/vat.shtml

Parameters

$value

string

The tax number to validate

Returns

\boo

Returns true if the checksum in the specified PPSN or tax number, without the 'IE' prefix, is valid.

checkMOD23(string $value) : bool
Static

Parameters

$value

string

Value to perform modulus 23 checksum on.

Returns

bool

 Properties

 

Error message templates

$_messageTemplates : array

 Constants

 

NOT_VALID

NOT_VALID