Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Non-English Validation Expression for email address?

Reply
Thread Tools

Non-English Validation Expression for email address?

 
 
Mark B
Guest
Posts: n/a
 
      07-22-2009
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?




 
Reply With Quote
 
 
 
 
Leon
Guest
Posts: n/a
 
      07-22-2009
On Wed, 22 Jul 2009 13:45:33 +1200, "Mark B" <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
dnanetwork dnanetwork is offline
Junior Member
Join Date: Jul 2009
Posts: 1
 
      07-22-2009
dude....regular expression in asp.net is given....you need to select email address validation...i think that's wot you need...?
 
Reply With Quote
 
Mark B
Guest
Posts: n/a
 
      07-22-2009
From
http://www.h-online.com/news/IEFT-pl...esses--/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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 22 Jul 2009 13:45:33 +1200, "Mark B" <(E-Mail Removed)> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Regular Expression for Email Validation jmhmaine ASP .Net Web Controls 9 01-28-2005 09:30 AM
EMail Validation (Regular Expression) Clive ASP .Net Web Controls 1 09-22-2003 08:39 PM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments