United States Social Security Number Validation
Object LibraryThis validation object is the perfect tool when you need to quickly determine if a United States Social Security Number could be valid.
Whether your data is coming from a web based form or a corporate database this validation object can be added to your application or script quickly and easily.
A United States Social Security Number is nine digits long and is composed of the Area Number, the Group Number, and the Serial Number. Validation is performed using the United States Social Security Administration group issuance algorithm and high group assignment data tables.
The Area Number is assigned by geographical region. Prior to 1972, cards were issued in local Social Security offices around the country and the Area Number represented the State in which the card was issued. Since 1972, when Social Security Administration began assigning Social Security Numbers and issuing cards centrally from Baltimore, the area number assigned has been based on the ZIP code in the mailing address provided on the application for the original Social Security card.
Within each area, the Group Number ranges from 01 to 99 but are not assigned in consecutive order. For administrative reasons, group numbers issued first consist of the ODD numbers from 01 through 09 and then EVEN numbers from 10 through 98, within each area number allocated to a State. After all numbers in group 98 of a particular area have been issued, the EVEN Groups 02 through 08 are used, followed by ODD Groups 11 through 99. Within each group, the Serial Number runs consecutively from 0001 through 9999.
The library is available in the Perl, PHP, and C++ programming languages. All versions share a common definition and naming convention for the validation object. The Perl version is designed for and requires Perl version 5 or above. The PHP version is designed for and requires PHP version 4 or above. The C++ version has no platform specific requirements and can be compiled with virtually any C++ compiler.
