The following sampel code can be used for validating Social Security Number (SSN)
using System.Text.RegularExpressions;
public class SsnTextBox: RegExTextBox
{
public SsnTextBox()
{
InitializeComponent();
this.ValidationExpression = @"^\d{3}-\d{2}-\d{4}$";
this.ErrorMessage = "The social security number must be in the form of 555-55-5555";
}
}