HI folks,
I've got myself a RadTextBox where the users are creating new records where one of the values is an SSN. From one of the examples I got the validation to make sure it's in the right format and that's working as expected. I'd like to add to the behavior so that it doesn't require the user to enter the dashes. In a best case scenario, the user could enter the dashes, or not, and the system will still accept the value.
This is whut I've got now:
Thanks for the help.
MArk B.
I've got myself a RadTextBox where the users are creating new records where one of the values is an SSN. From one of the examples I got the validation to make sure it's in the right format and that's working as expected. I'd like to add to the behavior so that it doesn't require the user to enter the dashes. In a best case scenario, the user could enter the dashes, or not, and the system will still accept the value.
This is whut I've got now:
<
telerik:RadTextBox
ID
=
"txtSSN"
runat
=
"server"
EmptyMessage
=
"Enter valid SSN..."
Width
=
"250px"
></
telerik:RadTextBox
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator4"
runat
=
"server"
ValidationGroup
=
"AddPatient"
ErrorMessage
=
"* Required Field"
ControlToValidate
=
"txtSSN"
/><
br
/>
<
asp:RegularExpressionValidator
id
=
"ssnValidator"
runat
=
"server"
Display
=
"Dynamic"
ErrorMessage
=
"Invalid SSN format"
ValidationExpression
=
"\d{3}-\d{2}-\d{4}"
ControlToValidate
=
"txtSSN"
>
Thanks for the help.
MArk B.