This is a migrated thread and some comments may be shown as answers.

RadMaskedTextBox doesn't work with RegularExpressionValidator

2 Answers 81 Views
Input
This is a migrated thread and some comments may be shown as answers.
Alan Wang
Top achievements
Rank 1
Alan Wang asked on 15 Jun 2012, 05:58 PM
Hi,

I tired latest verion Radcontrol Q2 2012 and found out the RadMaskedTextBox doesn't work with RegularExpressionValidator on IE 8 when you put wrong format input  and tab out the RadMaskedTextBox.  TheRegularExpressionValidator  doesn't show the error message even if the input doesn't match with Validation Expression. But works on the Firefox 12.

Note: I mean tab out not click button.

Following is my testing code:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
 <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask="(###)-######">
 </telerik:RadMaskedTextBox>
 <asp:RequiredFieldValidator Display="Dynamic" ID="MaskedTextBoxRequiredFieldValidator"
   runat="server" ErrorMessage="Please, enter a phone number." ControlToValidate="RadMaskedTextBox1"></asp:RequiredFieldValidator>
 <asp:RegularExpressionValidator Display="Dynamic" ID="MaskedTextBoxRegularExpressionValidator"
   runat="server" ErrorMessage="Format is (###)-######" ControlToValidate="RadMaskedTextBox1"
   ValidationExpression="\(\d{3}\)-\d{6}" />
 <asp:Button ID="Button1" runat="server" Text="Postback" OnClick="Button1_Click">
 </asp:Button>
 <asp:Label ID="lblMessage" runat="server"></asp:Label>
 </form>


I also tested on your demo site and same behavior:

http://demos.telerik.com/aspnet-ajax/input/examples/common/validation/defaultcs.aspx

Alan

2 Answers, 1 is accepted

Sort by
0
Alan Wang
Top achievements
Rank 1
answered on 18 Jun 2012, 05:38 PM
Is there anyone looking into this problem yet?

Alan
0
Vasil
Telerik team
answered on 19 Jun 2012, 07:29 AM
Hi Alan,

See this forum thread, the core of the issue is the same, try out the code, and let us know if it resolves the issue. We will do our best to provide a fix as soon as possible.

Regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
Alan Wang
Top achievements
Rank 1
Answers by
Alan Wang
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or