<telerik:RadMaskedTextBox ID="zipRMTB" runat="server" EmptyMessage="Zip Code"
Mask="##### - ####" SelectionOnFocus="SelectAll">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="zipRMTB"
Here, i am trying to validate RadMaskedTexBox,on btn click event it doent show validate errormessage,
and another problem is:
if i will insert incorrect data into MaskedTextBox like: _32_ - 1__0
how to validate these type of data with Validators??
4 Answers, 1 is accepted
From Q2 2012, you can set RequireCompleteText="true" for the RadMaskedTextBox, and and it will require full text to be entered in order to pass value to the RequiredFieldValidator different than empty string.
the Telerik team
RequireCompleteText="true" also validates empty values. I do not want to validate if user does not put any thing in it. Is there any property available for it??
Look at attached image.
Here is my skin for ZipExtension text Box:
Is there other way to validate this is except using regular expression validator and validate entire text.
Well it is not supported out of the box.
But you could override some methods in order to make it work. Here is the original code, and you can add an additional checks as per your requirements:
Also you may want to override the function ValidationText of server side RadMaskedTextBox class. Its current code is: