The Correct Way to Validate Email Addresses
Hmm, sorry but I don&#x27;t buy that the &quot;correct way to validate&quot; is <i>not</i> to validate the input.<p>Email addresses aren&#x27;t a special enough case to be handled differently than any other user input, which we always validate to both sanitize and show client-side errors, if nothing else.<p>Sure, the complete regex is complex, but it <i>is defined</i> and is hardly unconquerable.  Look at Django&#x27;s `EmailValidator` implementation for example [0] that is mature and well tested [1].<p>The author has not convinced me that ignoring validation is the right choice when options with a scope so thorough exist.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;blob&#x2F;master&#x2F;django&#x2F;core&#x2F;validators.py#L170" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;blob&#x2F;master&#x2F;django&#x2F;core&#x2F;val...</a><p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;blob&#x2F;a9215b7c36bff232bcc9416309726290dc74a9e8&#x2F;tests&#x2F;validators&#x2F;tests.py#L48" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;blob&#x2F;a9215b7c36bff232bcc941...</a>