I recently needed to verify that a user’s input was a valid US social security number.  Initially, I thought it was just a simple task of verifying 3 digits, a dash, 2 numbers, another dash, and finally 4 numbers.  However, as I started reading online, I realized that each block of numbers has a significance (which I assumed) and more importantly to my task, that they have specific numeric ranges.

If you want to read the details of the format then see the links at the bottom of the post.  The gist is that as of June 25, 2011, a valid social security number needs to follow the following guidelines: View full article »