How to collect Social Security Number (SSN) in the proper format while signing?
BoldSign allows you to capture Social Security Number (SSN) in a structured and validated manner using either a single text field with regular expression (regex) validation or multiple text fields with number validation. This article outlines both approaches to help senders choose the most suitable method based on their form design and compliance requirements.
Single text box with regex validation
Use a single text box to capture the full SSN (in the format 123-45-6789) and apply regex validation to ensure input accuracy. Follow below steps to achieve it:
- Click the
Create New
button and selectCreate New Document
from the options. - Fill in all the required fields and click the
Next
button. You will be directed to theConfigure Fields
page. - Drag and drop the
Textbox
field to the desired location in the document. This action will open the Textbox settings pane on the right-hand side. - Scroll down to the
Validation field
and chooseregex
option from the drop-down menu. Enter the desired regex value (e.g., ^\d{3}-\d{2}-\d{4}$, this regex pattern validates the entered input should be in the SSN format). - Add a
description
to provide signers with information on the required format. If the signer enters an incorrectly formatted SSN, they will see an error message prompting them to fix the input. - Adjust Font Size and Character Spacing to align with the layout of your document.
Separate text boxes with number validation
Break the SSN into three segments (XXX - XX - XXXX) using individual text boxes for each part. Each box can enforce number-only input. Follow below steps:
- Click the
Create New
button and selectCreate New Document
from the options. - Fill in all the required fields and click the
Next
button. You will be directed to theConfigure Fields
page. - Drag and drop the
Textbox
field to the desired location in the document. This action will open the Textbox settings pane on the right-hand side. - Scroll down to the
Validation field
and chooseonly numbers
option from the drop-down menu. - Adjust Font Size and Character Spacing to align with the layout of your document.
For more details on adding validations to the textbox formfields, please refer to our article:
How to add validation to the textbox form field?