RadMaskedTextBox doesn't work with RegularExpressionValidator

3 posts, 0 answers
  1. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 15 Jun 2012 Link to this post

    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. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 18 Jun 2012 Link to this post

    Is there anyone looking into this problem yet?

    Alan
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 19 Jun 2012 Link to this post

    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.
Back to Top