Jump to content

regular expression


joecool2005

Recommended Posts

Hi,I have a field with a regular expression like this

<asp:TextBox id="SSN" runat="server" MaxLength=9/> <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server"			ControlToValidate="SSN"			ErrorMessage="Sin not valid"			ValidationExpression="^\d{9}"			Display="Static"			Font-Name="verdana" 			Font-Size="10pt">			   <img src="images/error.gif" />		</asp:RegularExpressionValidator>

When the field is empty, the regular expression is good. But I don't want that. I want to have 9 digits and nothing else. How can I fix that?Thx

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...