The object of this rule is the validation of the Social Security Number in the USA. The Social Security number (SSN) is a nine-digit number issued to U.S. citizens, permanent residents, and temporary (working) residents under section 205(c)(2) of the Social Security Act.
The number is issued to an individual by the Social Security Administration, an independent agency of the United States government. Although its primary purpose is to track individuals for Social Security purposes, the Social Security number has become a de facto national identification number for taxation and other purposes.
Format to validate
The SSN has three groups of digits. A first group of 3 digits, a second group of 2 digits and a third group of 4 digits. A total of 9 digits.
The rule validates the number in the following formats:
- XXX XX XXXX
Validation criteria for SSN are based on rules set by the Social Security Administration.
- Does not contain all zeroes in any specific group (ie 000-xx-xxxx, xxx-00-xxxx, or xxx-xx-0000)
- Does not begin with ’666′.
- Does not begin with any value from ’900-999′
What is not validated
SSNs definition does not have any digits for any kind of validity check. The rule only validates the format, but does not assure that the SSN is issued or active.
The following strings are validated by the rule:
- 123 12 1234
The following strings are not validated by the rule:
- 123-12 1234
- 123 121234
Social Security Number Field
The rule have to be mapped to a FIELD (Labeled in Validator Setup as Social Security Number Field) in an OBJECT previously configured in your org.
This will be the field where you have the data you want to be validated by the rule
See image below:
This FIELD has to be a TEXT field with at least 9 digits
If you decide to use the WARNING validation action, (see image below), then you have to map as well other FIELD (Labeled in Validator Setup as Action Field) in the same OBJECT where you have the one validated by the rule.
This will be the field where you will receive the Action Message that you have to define as well.
The Action Field has to be preconfigured in the OBJECT as TEXT with a length long enough to contain the defined Action Message.
When the rule is applied, if the result is not correct, then the Action Field will be written with the Action Message. The record will be saved.
If the result is correct, then the Action Field will be written with the Axy Validator message “SSN is OK”. The record will be saved as well.
If you decide to use the ERROR validation action, (see image below), then you do not need to map other FIELD.
Yet you have to define the Action Message. .
When the rule is applied, if the result is not correct, then the Action Message will be shown as an Axy Validator error message. The record will be not saved.
If the result is correct, then the record will be saved and no error message appears.