#36809: Allow EmailValidator to customize error messages depending on the part 
that
failed validation
-------------------------------------+-------------------------------------
     Reporter:  Daniel E Onetti      |                    Owner:  Daniel E
         Type:                       |  Onetti
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  EmailValidator       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):

 * cc: Mike Edmunds (added)

Comment:

 Natalia's proposal would also simplify implementation of #27029 EAI
 address validation. (Or help developers who need that functionality sooner
 subclass EmailValidator themselves.)

 Django already uses "recipient" to mean a complete email address, possibly
 including a friendly display name (e.g.,
 django.core.mail.EmailMessage.all_recipients()). The official RFC 5322
 term for the part before the @ is ''local-part'', but other common terms
 are ''user'' (e.g., existing EmailValidator code), ''username'' (e.g.,
 Python's email.headerregistry.Address.username), or ''mailbox''. I'd maybe
 go with `validate_username()` and `validate_domain()` to align with
 Python's email package.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36809#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019b4c272bcd-1250f5a2-8bec-45c0-ab41-6da75e811bff-000000%40eu-central-1.amazonses.com.

Reply via email to