stdnum.do.cedula¶
Cedula (Dominican Republic national identification number).
A cedula is is an 11-digit number issues by the Dominican Republic government to citizens or residents for identification purposes.
>>> validate('00113918205')
'00113918205'
>>> validate('00113918204')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('0011391820A')
Traceback (most recent call last):
...
InvalidFormat: ...
>>> format('22400022111')
'224-0002211-1'
-
stdnum.do.cedula.
compact
(number)¶ Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
-
stdnum.do.cedula.
format
(number)¶ Reformat the passed number to the standard format.
-
stdnum.do.cedula.
is_valid
(number)¶ Checks to see if the number provided is a valid cedula.
-
stdnum.do.cedula.
validate
(number)¶ Checks to see if the number provided is a valid cedula.