Text box Can't have two type of validation

3 posts, 1 answers
  1. sk
    sk avatar
    20 posts
    Member since:
    Jan 2009

    Posted 02 Dec 2009 Link to this post

    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. Answer
    Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 04 Dec 2009 Link to this post

    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.
  3. sk
    sk avatar
    20 posts
    Member since:
    Jan 2009

    Posted 06 Dec 2009 Link to this post

    dear Radoslav ,

    thanks for your answer, i am understand it now.

    best regards;
    sookkien
Back to Top