RadMaskedInput & email addresses

2 posts, 0 answers
  1. Karl Wilkens
    Karl Wilkens avatar
    206 posts
    Member since:
    Oct 2012

    Posted 08 May 2009 Link to this post

    It states in the demo and general areas that you can use RadMaskedInput for email, but I cant find any examples and was not sure how to achieve this. Does anyone have any suggestions? Thanks.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 May 2009 Link to this post

    Hi Karl,

    I hope the approach to use RadTextBox with RegularExpressionValidator in order to validate the input for e-mail address is suitable for you.

    aspx:
     
    <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> 
    <br/> 
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />  

    Thanks,
    Shinu.
Back to Top