EMail Validation (Regular Expression)

Discussion in 'ASP .Net Web Controls' started by Clive, Sep 22, 2003.

  1. Clive

    Clive Guest

    Hi,

    I am using below email validator.

    On tabbing out of my textbox it displays an error if it si
    not in the correct format.

    If i go back and input it still
    displays the error and I can't submit my form. Why is this?

    <asp:RegularExpressionValidator id="EAV" Font-Size="10"
    Font-Bold="True" controltovalidate="txEMail"
    runat="server" ErrorMessage="EMail Adress must be valid"
    RegularExpression="^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.
    [0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)
    $"></asp:RegularExpressionValidator>
    Clive, Sep 22, 2003
    #1
    1. Advertising

  2. Clive

    vMike Guest

    Try changing RegularExpression= to ValidationExpression=
    "Clive" <> wrote in message
    news:05df01c38148$85cf0030$...
    > Hi,
    >
    > I am using below email validator.
    >
    > On tabbing out of my textbox it displays an error if it si
    > not in the correct format.
    >
    > If i go back and input it still
    > displays the error and I can't submit my form. Why is this?
    >
    > <asp:RegularExpressionValidator id="EAV" Font-Size="10"
    > Font-Bold="True" controltovalidate="txEMail"
    > runat="server" ErrorMessage="EMail Adress must be valid"
    > RegularExpression="^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.
    > [0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)
    > $"></asp:RegularExpressionValidator>
    vMike, Sep 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,272
  2. Linus Nikander

    Email regular expression validator

    Linus Nikander, Sep 19, 2003, in forum: Java
    Replies:
    2
    Views:
    12,233
    Roedy Green
    Sep 19, 2003
  3. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    832
    Alan Moore
    Dec 2, 2005
  4. GIMME
    Replies:
    3
    Views:
    11,924
    vforvikash
    Dec 29, 2008
  5. jmhmaine

    Regular Expression for Email Validation

    jmhmaine, Jan 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    9
    Views:
    196
    Steven Cheng[MSFT]
    Jan 28, 2005
Loading...

Share This Page