Crowdsourcing Validation Rules for Uganda National ID
I am curious about the ability to validate that the Uganda National Identification Number (NIN) is well formed. However this does not validate that the NIN actually belongs to the person presenting it or that it is correct.
The rules that I have been able to gleam are:
- Must be 14 characters long
- First character is a letter of the alphabet. C seems to be a common letter - does it stand for citizen?
- Second letter is either M or F - male or female
- Characters 3 and 4 are numbers, which are the year of birth. Cannot be after 00 since that would make a person below 18
- Characters 5, 6, 7 are numbers
How can you help? Which of these rules do not match your NIN? Share any additional patters to build a repository of rules that can later be mapped to programming language validations - Regular expressions and validation frameworks