Non-English Validation Expression for email address?

  • Thread starter Thread starter Mark B
  • Start date Start date
M

Mark B

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?
 
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.
 
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 said:
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.
 
Back
Top