Skip to content

Commit be65b53

Browse files
committed
Make taking the normalized form more critical to the main example
1 parent 6c53ad6 commit be65b53

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ from email_validator import validate_email, EmailNotValidError
5555
email = "my+address@mydomain.tld"
5656

5757
try:
58-
# Validate.
59-
valid = validate_email(email)
60-
61-
# Update with the normalized form.
62-
email = valid.email
58+
# Validate & take the normalized form of the email
59+
# address for all logic beyond this point (especially
60+
# before going to a database query where equality
61+
# does not take into account normalization).
62+
email = validate_email(email).email
6363
except EmailNotValidError as e:
6464
# email is not valid, exception message is human-readable
6565
print(str(e))

0 commit comments

Comments
 (0)