Skip to main content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Patterns

Ask users for…

Social security or VA file number

Use: Deployed
Follow this pattern whenever you need to collect a person's Social Security or VA file number for an application.

Usage

When to use this pattern

  • When you need to collect a person’s Social Security or VA file number. For example, for an application for identity purposes.

Examples

Shows the form fields used to obtain Social Security number and VA file number.
Example of asking for a Social security or VA file number.

View an example

How to design and build

How this pattern works

A Social Security Number (SSN) consists of nine digits, commonly written as three fields separated by hyphens: AAA-GG-SSSS. The first three-digit field is called the “area number”. The central, two-digit field is called the “group number”. The final, four-digit field is called the “serial number”.

A VA file number is how a Veteran’s claim is tracked through the compensation system and how documents and other evidence are associated with a Veteran’s file in the VA’s electronic database.

The ssnPattern implements the following:

  • Use a single text input for each field.
  • Do not abbreviate. Use ‘Social Security number’. Do not use abbreviations, such as SSN.
  • When asking for both Social Security and VA file numbers, one or the other may be provided. VA file numbers are not on every form.If the form asks for a Social Security number and VA file number make sure to note in the VA file number label or helper text, “must have this or a Social Security number”.
  • Give user flexibility in entering their Social Security number. A user can enter the Social Security number however they like: with spaces, without spaces, dashes, or without dashes. When the user enters their number and the input loses focus, the number will appear masked with dashes.
  • Validate Social Security numbers. See content considerations for the appropriate validation messages.

Components used in this pattern

Page templates available for this pattern

Use the VADS templates (Patterns & Forms) for Social Security or VA file number in Figma.

Code usage

ssnPattern is a web-component pattern available in the Forms library.

Content considerations

Labels, error messages, and hint text

Social Security number
Hint text: You must enter a Social Security number or VA file number
Error type: No entry
Error message: Enter a valid 9-digit Social Security number (dashes allowed)
VA file number
Hint text: None
Edit this page in GitHub (Permissions required)
Last updated: Apr 17, 2024