Skip to content
New issue

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

Expose normalization functionality in EmailStr #9451

Open
4 of 13 tasks
tamird opened this issue May 17, 2024 · 5 comments
Open
4 of 13 tasks

Expose normalization functionality in EmailStr #9451

tamird opened this issue May 17, 2024 · 5 comments

Comments

@tamird
Copy link

tamird commented May 17, 2024

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

email-validator provides a normalized view of validated email addresses. It should be possible to get this from EmailStr.

This was mentioned in #9416 which was closed.

Affected Components

@sydney-runkle
Copy link
Member

@tamird,

Ah I see, thanks for elaborating. Sounds like a great feature request. PRs welcome!

@tamird
Copy link
Author

tamird commented May 18, 2024

@sydney-runkle is there precedent for this kind of configuration? Do I need to introduce EmailStrNormalized?

@sydney-runkle
Copy link
Member

@tamird,

I think we could probably just introduce an extra property on the EmailStr class...

@tamird
Copy link
Author

tamird commented May 19, 2024

How would that work? Is there precedent for such configurability?

@sydney-runkle
Copy link
Member

@tamird,

Yeah, EmailStrNormalized could work, though I'm not sure if it's a high enough demand type that it belongs in Pydantic's code. Maybe pydantic-extra-types or simply user code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants