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
Calculate the check digit. The number passed should not have the check digit included.
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.