stdnum.ar.dni

DNI (Documento Nacional de Identidad, Argentinian national identity nr.).

The DNI number is the number that appears on the Argentinian national identity document and is used to identify citizen and foreigners residing in the country.

More information:

>>> validate('20.123.456')
'20123456'
>>> validate('2012345699')
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> format('20123456')
'20.123.456'
stdnum.ar.dni.compact(number)

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

stdnum.ar.dni.format(number)

Reformat the number to the standard presentation format.

stdnum.ar.dni.is_valid(number)

Check if the number is a valid DNI.

stdnum.ar.dni.validate(number)

Check if the number is a valid DNI.