Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmailStr validate-method performs lower() on whole string including local part, violating RFC 5321 by not conforming to
The local-part of a mailbox MUST BE treated as case sensitive. https://tools.ietf.org/rfc/rfc5321.txt
See
pydantic/pydantic/networks.py
Line 383 in 7901711
import sys; print(sys.version)
import pydantic; print(pydantic.VERSION)
Where possible please include a self contained code snippet describing your bug:
import pydantic assert pydantic.EmailStr.validate('AbC@example.com') == 'AbC@example.com'
The text was updated successfully, but these errors were encountered:
Thanks for reporting, PR welcome to fix this.
Sorry, something went wrong.
Closing as it looks like this was addressed by #801. Thanks for the contribution @henriklindgren!
this RFC 5321 looks outdated as most email services works with emails as case insensitive, and following this RFC just complicates our life. just IMHO.
Is there a simple way to get the old behavior back?
No branches or pull requests
Bug
EmailStr validate-method performs lower() on whole string including local part, violating RFC 5321 by not conforming to
See
pydantic/pydantic/networks.py
Line 383 in 7901711
import sys; print(sys.version)
: Anyimport pydantic; print(pydantic.VERSION)
: 0.32.2Where possible please include a self contained code snippet describing your bug:
The text was updated successfully, but these errors were encountered: