C
Chris Barrow
Hi Everyone,
I am using a regular expression validator control in a web
form. I essentially want the control to pattern match
whether or not a user has enter non-digit characters into
a text field. Here is the control syntax along with the
reg expression:
<asp:regularexpressionvalidator id="rxvCity"
runat="server" controltovalidate="txtCity" display="None"
validationexpression="[^0-9]" errormessage="City field
cannot contain numeric characters"/>
Problem: the expression doesn't seem to validate. No
matter what I type into the text field, the errormessage
is always returned. Is there something wrong here with my
syntax for the reg expression? I have also tried "\D" but
that doesn't seem to work either. Curiously, another reg
validator control that uses the expression: "\d{3}-\d{3}-\d
{4}" works just fine.
If anyone has an idea on why this is happening, I would
greatly appreciate it.
Thanks,
Chris...
I am using a regular expression validator control in a web
form. I essentially want the control to pattern match
whether or not a user has enter non-digit characters into
a text field. Here is the control syntax along with the
reg expression:
<asp:regularexpressionvalidator id="rxvCity"
runat="server" controltovalidate="txtCity" display="None"
validationexpression="[^0-9]" errormessage="City field
cannot contain numeric characters"/>
Problem: the expression doesn't seem to validate. No
matter what I type into the text field, the errormessage
is always returned. Is there something wrong here with my
syntax for the reg expression? I have also tried "\D" but
that doesn't seem to work either. Curiously, another reg
validator control that uses the expression: "\d{3}-\d{3}-\d
{4}" works just fine.
If anyone has an idea on why this is happening, I would
greatly appreciate it.
Thanks,
Chris...