Skip to content

Commit

Permalink
validate_email - migrate to email-validator 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Nov 13, 2023
1 parent 0de8a5a commit 3e11269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ def validate_email(value: str) -> tuple[str, str]:
'value_error', 'value is not a valid email address: {reason}', {'reason': str(e.args[0])}
) from e

return name or parts['local'], parts['email']
return name or parts.local_part, parts.normalized

0 comments on commit 3e11269

Please sign in to comment.