Non-English Validation Expression for email address?

Discussion in 'ASP .Net' started by Mark B, Jul 22, 2009.

  1. Mark B

    Mark B Guest

    I have a Regular Expression Validator that works when validating the syntax
    of an email address:


    <asp:RegularExpressionValidator ID="RegularExpressionValidator1"
    runat="server"
    ControlToValidate="TextBox3"
    SetFocusOnError="True"
    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
    *Enter valid email address
    </asp:RegularExpressionValidator>


    However the above Validation Expression causes the "*Enter valid email
    address" message to appear when the email address has characters that aren't
    English. E.g. the message comes up when the email address has Chinese
    characters.

    Does anyone know what the Validation Expression would be that would allow
    all non-English characters as well?
     
    Mark B, Jul 22, 2009
    #1
    1. Advertising

  2. Mark B

    Leon Guest

    On Wed, 22 Jul 2009 13:45:33 +1200, "Mark B" <> wrote:

    >I have a Regular Expression Validator that works when validating the syntax
    >of an email address:
    >
    >
    ><asp:RegularExpressionValidator ID="RegularExpressionValidator1"
    >runat="server"
    >ControlToValidate="TextBox3"
    >SetFocusOnError="True"
    >ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
    >*Enter valid email address
    ></asp:RegularExpressionValidator>
    >
    >
    >However the above Validation Expression causes the "*Enter valid email
    >address" message to appear when the email address has characters that aren't
    >English. E.g. the message comes up when the email address has Chinese
    >characters.
    >
    >Does anyone know what the Validation Expression would be that would allow
    >all non-English characters as well?
    >
    >
    >


    Correct me if i'm wrong, but -AFAIK- email adresses can only consist
    of a-z and 0-9 and special chars . - _ (i think), so why would you
    want to check on other then that?

    ..L.
     
    Leon, Jul 22, 2009
    #2
    1. Advertising

  3. Mark B

    dnanetwork

    Joined:
    Jul 22, 2009
    Messages:
    1
    dude....regular expression in asp.net is given....you need to select email address validation...i think that's wot you need...?
     
    dnanetwork, Jul 22, 2009
    #3
  4. Mark B

    Mark B Guest

    From
    http://www.h-online.com/news/IEFT-planning-internationalised-email-addresses--/111542
    (see last sentence too):

    ....

    The Internet Engineering Task Force (IETF) has published three crucial
    documents for the standardisation of email address headers that include
    symbols outside the ASCII character set. This means that soon you'll be able
    to use Chinese characters, French accents, and German umlauts in email
    addresses as well as just in the body of the message. So if your name is Zoë
    and you work for a company that makes façades, you might be interested in a
    new email address. But representatives of providers are already moaning.
    They say there would need to be an "upgrade mania" if the Unicode standard
    UTF-8 is to replace the American Standard Code for Information Interchange
    (ASCII) currently used as the general email language.

    RFC 5335 specifies the use of UTF-8 in practically all email headers.
    Changes would have to be made to SMTP clients, SMTP servers, mail user
    agents (MUAs), software for mailing lists, gateways to other media, and
    everywhere else where email is processed or passed along. RFC 5336 expands
    the SMTP email transport protocol. At the level of the protocol, the
    expansion is labelled UTF8SMTP.

    A new header field will be added as a sort of "emergency parachute" to
    ensure that UTF-8 emails have a soft landing if they are thrown out before
    reaching the recipient by systems that have not been upgraded. The
    "OldAddress" is a purely ASCII address. But OldAddress is not to be used as
    a channel for a second transfer attempt, but rather to make sure that
    feedback is sent home.

    Finally, RFC5337 ensures that correct messages are sent pertaining to the
    delivery status of non-ASCII emails. The correct address of an unreachable
    addressee must be sent back, even if further transport has been refused. The
    email Address Internationalization (EAI) working group is also working on a
    number of "downgrade mechanisms" for various header fields and the envelope.
    If possible, original header information is to be "packaged" and preserved.

    Germany's DeNIC, the registrar for the ".de" domain, is nonetheless taking
    this in its stride. "There is really not much we can do", explained DeNIC
    spokesperson Klaus Herzig. DeNIC is instead paying more attention to the
    update that the IETF is working on for the standard of international
    domains - RFC3490, or IDNA2003 as it's sometimes known. "We are not that
    happy about it because there is no backwards compatibility," Herzig
    explained. When the update comes, DeNIC says it will be throwing its weight
    behind the symbol "ß" - also known as estzett - which has been overlooked up
    to now. The German registrar also says that it may wait a bit before
    switching in light of the lack of backward compatibility. Once the new
    standard is running stably and registrars and providers have adopted it, the
    ß will be added.

    In contrast, experts believe that Chinese registrars in China and Taiwan
    will quickly implement the change for internationalised email.
    Representatives of CNIC and TWNIC are authors of the standards. Chinese
    users currently have to write emails in ASCII to the left of the @ and in
    Chinese characters to the right of it for Chinese domains, which have
    already been internationalized.

    <





    "Leon" <> wrote in message
    news:...
    > On Wed, 22 Jul 2009 13:45:33 +1200, "Mark B" <> wrote:
    >
    >>I have a Regular Expression Validator that works when validating the
    >>syntax
    >>of an email address:
    >>
    >>
    >><asp:RegularExpressionValidator ID="RegularExpressionValidator1"
    >>runat="server"
    >>ControlToValidate="TextBox3"
    >>SetFocusOnError="True"
    >>ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
    >>*Enter valid email address
    >></asp:RegularExpressionValidator>
    >>
    >>
    >>However the above Validation Expression causes the "*Enter valid email
    >>address" message to appear when the email address has characters that
    >>aren't
    >>English. E.g. the message comes up when the email address has Chinese
    >>characters.
    >>
    >>Does anyone know what the Validation Expression would be that would allow
    >>all non-English characters as well?
    >>
    >>
    >>

    >
    > Correct me if i'm wrong, but -AFAIK- email adresses can only consist
    > of a-z and 0-9 and special chars . - _ (i think), so why would you
    > want to check on other then that?
    >
    > .L.
     
    Mark B, Jul 22, 2009
    #4
    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. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    English/English DLL

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Oct 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,681
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Oct 16, 2005
  2. IchBin
    Replies:
    1
    Views:
    786
  3. Lad
    Replies:
    2
    Views:
    349
    Tim Roberts
    Sep 27, 2006
  4. Replies:
    9
    Views:
    2,422
    Jussi Piitulainen
    Dec 2, 2006
  5. Mark B
    Replies:
    13
    Views:
    893
    Juan T. Llibre
    Aug 17, 2009
Loading...

Share This Page