TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number).
The n° TVA (Numéro d’identification à la taxe sur la valeur ajoutée) is used for tax purposes in Luxembourg. The number consists of 8 digits of which the last two are check digits.
>>> validate('LU 150 274 42')
'15027442'
>>> validate('150 274 43') # invalid check digits
Traceback (most recent call last):
...
InvalidChecksum: ...
Calculate the check digits for the number.
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.
Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.