stdnum.ec.ci¶
CI (Cédula de identidad, Ecuadorian personal identity code).
The CI is a 10 digit number used to identify Ecuadorian citizens.
>>> validate('171430710-3')
'1714307103'
>>> validate('1714307104') # invalid check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('171430710') # digit missing
Traceback (most recent call last):
...
InvalidLength: ...
- stdnum.ec.ci.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.ec.ci.is_valid(number)¶
Check if the number provided is a valid CI number. This checks the length, formatting and check digit.
- stdnum.ec.ci.validate(number)¶
Check if the number provided is a valid CI number. This checks the length, formatting and check digit.