Regular expression for price validation in asp.net c#
Regular expression for price validation in asp.net
c#
Need
regular expression which have:
1. Maximum
8 digits before decimal(.) point
2. Maximum
4 digits after decimal point
3. Decimal
point is optional
Maximum valid decimal is 8 digits before decimal and
4 digits after decimal So 99999999.9999
<asp:TextBox ID="txtproductprice" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="reprice" ValidationExpression="^\d{0,8}(\.\d{1,4})?$" runat="server" ErrorMessage="Please Enter Your
Correct Product Price" ControlToValidate="txtproductprice" Display="Dynamic" ForeColor="Red" SetFocusOnError="True"></asp:RegularExpressionValidator>
Regular expression for price validation in asp.net c#
Reviewed by NEERAJ SRIVASTAVA
on
6:24:00 PM
Rating:
No comments: