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: ...
Traceback (most recent call last):
...
InvalidLength: ...
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Checks to see if the number provided is a valid CI number. This checks the length, formatting and check digit.
Checks to see if the number provided is a valid CI number. This checks the length, formatting and check digit.