
Let’s say say we have the ID number above. If you’re interested in looking at / extending / forking, the source is up on GitHub. They’re so that you can insert ID numbers directly into input fields: If you’ve come here because you’ve seen the new permissions the extension is requesting (which are alarming I concur, Chrome doesn’t allow for finer permissions in this context): The below won’t apply as soon as the new version is approved, but for anyone that briefly got the extension while I thought I needed an awful permission: If you’re not interested in the methods used but just need to generate or analyse ID numbers, check the Chrome extension here. Initial code that was used to begin this investigation can be found at Marcin Pajdzik’s post. This post will examine the existing methods of producing SA ID numbers found on the web in conjunction with the ID book information and present some JavaScript functions to verify an entered ID number, to extract relevant information from that ID number and to generate new, valid ID numbers that can be used in testing. The more recent ID books come with an explanation of what the ID numbers actually mean, which we can combine with what we already know to produce a reasonable approximation.

The information available from the Department of Home Affairs is historically patchy, which has produced a range of implementations and restrictions in various blogs.

No one likes entering the same data over and over again, after all.įirst off, we need to understand exactly how they work. There are two ways we can take advantage of ID numbers – we can verify them using their check digit to ensure that the user entered their ID number correctly, and we can extract information from them to speed up the rest of the application process. 5.1 Is the ID valid – the Luhn Algorithm in CodeĪn ID number is a basic requirement for various online applications.
