ID Number validation in South Africa
Following up on a previous post about South African Identity Number Validation the gender is specified by the 7th number in the id number.
For females they have a 0 and for males it is 5. For people who have gender changes they keep their original identity number according to information from Home Affairs.
More about this later.
Comments
Jacques, I managed to get the official sheet from Home Affairs. I've posted what I found out on my blog, and have also written a C# class to do the validation and stip info from the ID number. Dunno if you'd be interested though, since you mainly code in Perl.
In any case, I'd really appreciate it if you could look over my entry and see if there is anything there that bit you when validating ID numbers.
Posted by: Sean Hederman
|
October 7, 2004 1:58 PM
I've had a look at your blog post. One of the things that we do with the date of birth is check it's a valid date prior to doing running the checksum stuff. We've run the code using numerous South African identity numbers of clients and found no problem with it. I've even generated some "test" identity numbers which is known to fail everytime due to the identity numbers not being valid according to the regexp.
The one thing to note that that the gender is either 0 for female or 5 for male.
I'm still searching for a few government gazette pages which deals with the South African identify numbers.
One can also use a credit bearix to verify that the identity number supplied by a client infact belongs to the said client provided that the client allows you to run a credit check on themselves.
The control digit you can generate based on the numbers identity number minus the last number.
I'm going to submit some South African validation routines for the PEAR Validate project in the near future but due to work commitments I've not had the time yet to do so.
Posted by: Jacques
|
October 8, 2004 10:08 AM