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

RegExpTextBoxSetting for TextBox

2 Answers 117 Views
Input
This is a migrated thread and some comments may be shown as answers.
rachel
Top achievements
Rank 1
rachel asked on 04 Oct 2010, 01:44 PM

I have a asp:TextBox and RegExpTextBoxSetting that connected to it.
I have 2 qustions:
1.  Can the RegExpTextBoxSetting use with client function for validation? (instead the RegularExpression)
      I want that the checking will done by the function.

2.  Can I connect the RegExpTextBoxSetting to RadTextBox?
     In the examples, its working only with the asp:TextBox !

 
Thanks.

2 Answers, 1 is accepted

Sort by
0
rachel
Top achievements
Rank 1
answered on 05 Oct 2010, 12:42 PM
Is there any solution for my qustion?
0
Tsvetina
Telerik team
answered on 07 Oct 2010, 12:17 PM
Hi Rachel,

You can wire the OnBlur client-side event of RadInputManager and perform the check there. In this scenario you may not even need to add a RegExpTextBoxSetting to the textbox.

RadTextBox does not have a RegExpTextBoxSetting but you can still limit the input values by using a RegularExpressionValidator as suggested in this help article:
<telerik:RadTextBox ID="RadTextBox1" runat="server">
</telerik:RadTextBox>
<asp:RegularExpressionValidator
    id="emailValidator"
    runat="server"
    Display="Dynamic"
    ErrorMessage="Please, enter valid e-mail address."
    ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
    ControlToValidate="RadTextBox1">
</asp:RegularExpressionValidator>


Sincerely yours,
Tsvetina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Input
Asked by
rachel
Top achievements
Rank 1
Answers by
rachel
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or