Skip to content

EmailValidator type #385

Open
Open
@samuelcolvin

Description

@samuelcolvin

Using mail_parser I guess.

Rationale:

  • remove the email-validator optional dependency from pydantic, and its descendant dependencies - dnspython and idna
  • should be faster
  • the NameEmail "My Name <[email protected]>" parsing can be improved, see NameEmail should support quoted names pydantic#3173 - rust is much better for this kind of parsing than python (actually looks like mail_parser supports this out of the box)

We just need to make sure that adding mail_parser dependency doesn't significantly increase binary size - any one working on this. I encourage you to do a very simple POC implementation, create a PR and ask us to add the "Full Build" lable to see how much binary size has increased before completing the PR, in case we have to abandon the idea due to this.

To be clear we need two validators EmailValidator and NameEmailValidator which will be represented by EmailStr and NameEmail in pydantic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions