ValidationExpression for a single number

  • Thread starter Thread starter TD
  • Start date Start date
T

TD

Is it possible to validate (or in this case, invalidate) an exact
number with a RegularExpressionValidator?

I know that it can be done with javascript but what about regular
expressions?

Any 5 digit number between 00000 and 99999 is ok EXCEPT 61280.

I'm handling the "any 5 digits" portion with this "^\d{5}$" .... Does
anyone know how to disallow 61280 ?

Thanks, TD

<asp:RegularExpressionValidator
ValidationExpression=""
Runat="server"
ControlToValidate="txtsubacct_no"
ErrorMessage="61280 is not valid"
Display="Dynamic"
ID="regexV1">
</asp:RegularExpressionValidator>
 
Back
Top