# EmailValidator simplification and international email addresses

**URL:** <https://forum.djangoproject.com/t/emailvalidator-simplification-and-international-email-addresses/39985>\
**Category:** Django Internals\
**Created:** [March 28, 2025, 9:58pm UTC](https://forum.djangoproject.com/t/emailvalidator-simplification-and-international-email-addresses/39985 "2025-03-28T21:58:25Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [April 29, 2025, 8:12pm UTC](https://forum.djangoproject.com/t/emailvalidator-simplification-and-international-email-addresses/39985/11 "2025-04-29T20:12:41Z")

</div>

I’m going to close #26423 as wontfix: it’s just not practical to “Make EmailValidator use HTML5 validation.” (And it would likely create as many problems as it solves.)

That leaves #27029, supporting non-ASCII local-parts (EAI). There seem to be two viable approaches:

- Update the EmailValidator user\_regex per RFC 6532 (allow UTF8-non-ascii in both the dot-atom and quoted-string sections)
- Replace the EmailValidator user\_regex with a greatly simplified check that is essentially “non-empty”: proposal below

In either case, this is a potentially breaking change, so it needs to be opt-in when introduced. (And could later be made the default through the usual deprecation process.)

### Proposal: `EmailValidator(simplified=True)`

- Add a new `simplified` keyword parameter to EmailValidator.\_\_init\_\_(). (I’m suggesting a parameter rather than a new validator class, similar to DomainNameValidator’s accept\_idna.)
- When `simplified` is True, EmailValidator would check that both user\_part.strip() and domain\_part.strip() are not empty and do not contain any of the characters \x00–\x1F or \x7F (the “C0 control characters” or DEL). And that’s all—no user\_regex, no domain\_regex.
- The default is `simplified=False` to avoid a breaking change. (As a separate, future ticket, someone could propose changing the default to True and deprecating the complex regexps. But I am _not_ proposing that now.)
- Introduce an EmailValidator.validate\_user\_part() method to simplify subclassing, paralleling the existing validate\_domain\_part().
- Document that apps wanting to allow EAI addresses should use EmailValidator(simplified=True). Or for more complex requirements, create their own EmailValidator subclass that overrides validate\_user/domain\_part().
- Close #27029 as fixed (obsoleted) via this change.

Question: do we need a way to mix simplified user\_part checking with existing domain\_part checking (which is mostly borrowed from DomainNameValidator)? Can we just suggest a custom subclass for this case?

[Apologies in advance for @-ing: @apollo13, @carltongibson and @claudep had expressed strong opinions in #27029 and may have missed this thread among all the GSoC proposals. And @timgraham originally opened #26423, which I’m going to close.]

---

_[View the full topic](https://forum.djangoproject.com/t/emailvalidator-simplification-and-international-email-addresses/39985)._
