Alex Rivera | Logout

non-latin email address validation

Asked 2010-05-24T18:21:09.330
12

Now that ICann is allowing non-latin-character domain names, should I be concerned about e-mail validation? Currently, my sites are using php functions to ensure some alpha-numeric character set in each segment of an email address. Will these other character sets, such as Cyrillic, Arabic, and Chinese, pass validation? Are there recommended php functions to utilize for this?

Edit
Report

1 Answer

0

I was going to recommend using filter_var() with the FILTER_VALIDATE_EMAIL filter. But after a Google search it turns out it doesn't support multi-byte characters yet. It looks like, for now, your best bet is to strip out non-latin characters and perform the usual validations against that (although checkdnsrr will obviously fail since you've changed the domain by removing the non-Latin characters and replaced them with their Latin equivalents so if you use that to verify the MX records of the email's domain then you will need to temporarily disable that).

answered 2010-05-24T20:14:01.150

Your Answer