Apr 01, 2009, 11:10 AM
Validate regular expresion - TextField
Hi,
I had a problem with the regex property of the TextField.
If I do:
I've tried to do the next:
I hope It cans be useful.
Best wishes.
I had a problem with the regex property of the TextField.
If I do:
<ext:TextField ID="txtDiscount" Width="120" runat="server" Regex="[1][0][0]|[0-9]{1,2}(\.[0-9]{1,2})?" RegexText="Invalid format" />
the validate is incorrect. I've tried to do the next:
<ext:TextField ID="txtDiscount" Width="120" runat="server" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtDiscount" ValidationExpression="[1][0][0]|[0-9]{1,2}(\.[0-9]{1,2})?" runat="server" ErrorMessage="Invalid format"></asp:RegularExpressionValidator>
and it found correcty.I hope It cans be useful.
Best wishes.