[CLOSED] TextField regex issue.

  1. #1

    [CLOSED] TextField regex issue.

    Hi,

    I've made a regex for checking user input of e-mail addresses:
    TextField1.Regex = @"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
    TextField1.RegexText = "Incorrect e-mail format";
    but even when user typed correct e-mail address it still show like it was incorrect.
    screen:
    Click image for larger version. 

Name:	regex.png 
Views:	66 
Size:	539 Bytes 
ID:	5434

    Need I add something else to make it right?

    Thanks,
    ViDom
    Last edited by Daniil; Jan 18, 2013 at 3:02 PM. Reason: [CLOSED]
  2. #2
    In your regex you use upper case A-Z but input field contains lower case therefore text is not match the regex
    Frankly, you just need to set Vtype="email" for TextField
  3. #3
    Quote Originally Posted by Vladimir View Post
    In your regex you use upper case A-Z but input field contains lower case therefore text is not match the regex
    Frankly, you just need to set Vtype="email" for TextField
    Thanks @Vladimir:)

    I've missed that in reges got only uppercase. Now it's working. Vtype is as well good:) but for my project regex works better (I have dynamically generate controls with custom attributes) :)

    Thread can be closed:)

Similar Threads

  1. issue about maxlength of TextField
    By sonnh11 in forum 1.x Help
    Replies: 4
    Last Post: Jan 07, 2013, 6:33 AM
  2. [CLOSED] Textfield disable issue
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 16, 2011, 10:01 AM
  3. [CLOSED] Issue of using Regex
    By thchuong in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 27, 2011, 2:41 AM
  4. REGEX
    By hbbazan in forum 1.x Help
    Replies: 0
    Last Post: Jan 27, 2010, 4:09 PM
  5. textfield regex using javascript value
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Sep 04, 2009, 12:29 AM

Tags for this Thread

Posting Permissions