n° TVA (taxe sur la valeur ajoutée, French VAT number).
The n° TVA (Numéro d’identification à la taxe sur la valeur ajoutée) is the SIREN (Système d’Identification du Répertoire des Entreprises) prefixed by two digits. In old style numbers the two digits are numeric, with new style numbers at least one is a alphabetic.
>>> compact('Fr 40 303 265 045')
'40303265045'
>>> validate('23334175221')
'23334175221'
>>> validate('84 323 140 391')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('K7399859412') # new-style number
'K7399859412'
>>> validate('4Z123456782') # new-style number starting with digit
'4Z123456782'
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.