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

Text box Can't have two type of validation

2 Answers 69 Views
Input
This is a migrated thread and some comments may be shown as answers.
sk
Top achievements
Rank 1
sk asked on 02 Dec 2009, 08:28 AM
hi, i have a text box that need to be fill in the email address. Before i am posting the value, i need the email address text box should not be empty and in the correct form.
I have using the RadInputManager  to control the regular expression for the email address and the required field but, when i have load the page, the regular expression will always load finally in the page. will the rad Input Manager for each field can only be control at once times? how can i load the validate for required field first and the regular expression in second instance?

best regard;
sookkien

2 Answers, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 04 Dec 2009, 02:28 PM
Hi sk,

One TextBox can only be controlled by one RadInputManager setting because each of the RadInputManager settings applies for different behavior. In your case you could use RegExpTextBoxSetting with Validation-IsRequired property set to “true”. This will fire both required field validation and regular expression validation, however the error message will be only one. The other option is to use RadTextBox/TextBox with asp validators.

I am attaching a sample project illustrating the both cases.

Kind regards,
Radoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sk
Top achievements
Rank 1
answered on 07 Dec 2009, 03:45 AM
dear Radoslav ,

thanks for your answer, i am understand it now.

best regards;
sookkien
Tags
Input
Asked by
sk
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
sk
Top achievements
Rank 1
Share this question
or