User Profile
Collapse
-
Even using ^(\d{0,3}) gives me issues with an empty textbox -
asp.net...
Code:<...ID="PercentageValidate" Display="Dynamic" ForeColor="Red" runat="server" ControlToValidate="Percentage" ValidationExpression="^\d{0,3}(\.\d{0,2})?$" ErrorMessage="Error!" />Leave a comment:
-
Regular Expression - having issues with empty string
Hi, I have a textbox where I want the user to be able to enter either:
(1). Nothing
(2). up to 3 digits, optional decimal, up to 2 decimals.
I've been using ^\d{0,3}(\.\d{0 ,2})?$ but it's not allowing the empty string.
Thanks for any help!
No activity results to display
Show More
Leave a comment: