stdnum.ie.vat

VAT (Irish VAT number).

The Irish VAT number consists of 8 digits. The last digit is a check letter, the second digit may be a number, a letter, “+” or “*”.

>>> compact('IE 6433435F')
'6433435F'
>>> is_valid('6433435F')
True
>>> is_valid('6433435E')  # incorrect check digit
False
>>> is_valid('8D79739I')  # old style number
True
>>> is_valid('8?79739J')  # incorrect old style
False
stdnum.ie.vat.calc_check_digit(number)

Calculate the check digit. The number passed should not have the check digit included.

stdnum.ie.vat.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.ie.vat.is_valid(number)

Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.

Previous topic

stdnum.ie.pps

Next topic

stdnum.imei