Non-English Validation Expression for email address?

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?
 
L

Leon

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.
 
Joined
Jul 22, 2009
Messages
1
Reaction score
0
dude....regular expression in asp.net is given....you need to select email address validation...i think that's wot you need...?
 
M

Mark B

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top