stdnum.in_.epic¶
EPIC (Electoral Photo Identity Card, Indian Voter ID).
The Electoral Photo Identity Card (EPIC) is an identity document issued by the Election Commission of India (ECI) only to the India citizens who have reached the age of 18.
Each EPIC contains an unique 10 digit alphanumeric identifier known as EPIC number or Voter ID number.
Every EPIC number begins with a Functional Unique Serial Number (FUSN), a 3 letter unique identifier for each Assembly Constituency. FUSN is followed by a 6 digit serial number and 1 check digit of the serial number calculated using Luhn algorithm.
More information:
>>> validate('WKH1186253')
'WKH1186253'
>>> validate('WKH118624')
Traceback (most recent call last):
...
InvalidLength: ...
>>> validate('1231186253')
Traceback (most recent call last):
...
InvalidFormat: ...
>>> validate('WKH1186263')
Traceback (most recent call last):
...
InvalidChecksum: ...
- stdnum.in_.epic.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.in_.epic.is_valid(number)¶
Check if the number provided is a valid EPIC number. This checks the length, formatting and checksum.
- stdnum.in_.epic.validate(number)¶
Check if the number provided is a valid EPIC number. This checks the length, formatting and checksum.