stdnum.fr.tva

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'
>>> is_valid('23334175221')
True
>>> is_valid('84 323 140 391')  # incorrect check digit
False
>>> is_valid('K7399859412')  # new-style number
True
>>> is_valid('4Z123456782')  # new-style number starting with digit
True
stdnum.fr.tva.compact(number)

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

stdnum.fr.tva.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.fr.siren

Next topic

stdnum.gb.vat