I am trying to use a RegularExpressionValidator with a Telerik RadMaskedTextBox, and it's not working. The validator works just fine on a regular TextBox, but it doesn't activate on the RadMaskedTextBox. Can anyone tell me is this not possible to do? Or is there a way to make it work? Thanks

 <telerik:RadMaskedTextBox ID="txtFederalTaxID" runat="server" Mask="##-#######" CssClass="field" SelectionOnFocus="SelectAll" RequireCompleteText="true">
                                                    </telerik:RadMaskedTextBox>
                                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>                                                                                                           
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" ErrorMessage="*" ControlToValidate="txtFederalTaxID" InitialValue="" ValidationGroup="Terms"></asp:RequiredFieldValidator>
                                                   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtFederalTaxID" runat="server" ValidationExpression="(?=\d+)(?!876543210|987654321|012345678|123456789)(?!0{9}|1{9}|2{9}|3{9}|4{9}|5{9}|6{9}|7{9}|8{9}|9{9}).{9}" ErrorMessage="Invalid!" Width="20px"></asp:RegularExpressionValidator>                                                                                                                 

Related posts

Recent Viewed