stdnum.ve.rif

RIF (Registro de Identificación Fiscal, Venezuelan VAT number).

The Registro de Identificación Fiscal (RIF) is the Venezuelan fiscal registration number. The number consists of 10 digits where the first digit denotes the type of number (person, company or government) and the last digit is a check digit.

>>> validate('V-11470283-4')
'V114702834'
>>> validate('V-11470283-3')  # invalid check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.ve.rif.calc_check_digit(number)

Calculate the check digit for the RIF.

stdnum.ve.rif.compact(number)

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

stdnum.ve.rif.is_valid(number)

Check if the number provided is a valid RIF. This checks the length, formatting and check digit.

stdnum.ve.rif.validate(number)

Check if the number provided is a valid RIF. This checks the length, formatting and check digit.