﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17867	validate_email fails with IDN domains	Pierre <pierre.matri@…>	nobody	"URLValidator has been fixed with #12988. However, validate_email still fails with IDN E-mail addresses, especially with long TLDs (see [http://idn.icann.org/E-mail_test] for examples).

{{{
>>> import django
>>> django.get_version()
'1.4c1'
>>>
>>> from django.core.validators import validate_email
>>> validate_email('mailtest@xn--zkc6cc5bi7f6e.xn--hlcj6aya9esc7a')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 155, in __call__
    super(EmailValidator, self).__call__(u'@'.join(parts))
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 44, in __call__
    raise ValidationError(self.message, code=self.code)
ValidationError: [u'Enter a valid e-mail address.']
>>> validate_email('mailtest@xn--mgbh0fb.xn--kgbechtv')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 155, in __call__
    super(EmailValidator, self).__call__(u'@'.join(parts))
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 44, in __call__
    raise ValidationError(self.message, code=self.code)
ValidationError: [u'Enter a valid e-mail address.']
>>> validate_email('mailtest@xn--hxajbheg2az3al.xn--jxalpdlp')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 155, in __call__
    super(EmailValidator, self).__call__(u'@'.join(parts))
  File ""/home/dev/coolo-django/local/lib/python2.7/site-packages/django/core/validators.py"", line 44, in __call__
    raise ValidationError(self.message, code=self.code)
ValidationError: [u'Enter a valid e-mail address.']
>>>
}}}"	Bug	closed	Forms	1.4-beta-1	Normal	fixed	idn		Accepted	1	0	0	0	0	0
