#18119: add DomainNameValidator to validate Internet Domain Names
------------------------------+------------------------
     Reporter:  michele       |      Owner:  nobody
         Type:  New feature   |     Status:  new
    Component:  Core (Other)  |    Version:  1.4
     Severity:  Normal        |   Keywords:  validators
 Triage Stage:  Unreviewed    |  Has patch:  1
Easy pickings:  0             |      UI/UX:  0
------------------------------+------------------------
 Internet Domain Names are very present throughout, e.g. in URLs and e-mail
 addresses.

 This patch adds django.core.validators.DomainNameValidator to check
 Internet Domain Names.

 DomainNameValidator supports IDNA (utf) domain names, but it can reject
 them if optional accept_idna=False is passed to the constructor (defaults
 to accept).

 DomainNameValidator is implemented as follows:
  * derives RegexValidator
  * uses the same RegEx of URLValidator (with the additional constrain to
 accept only 127 labels / 255 chars, as per RFC)
  * if plain validation fails, converts UTF -> ASCII with IDNA encoding and
 attempts to validate again (unless accept_idna=False)

 Based on this Validator, I will submit separate patches to add
 DomainNameField support for models.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18119>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to