Skip to content

Fix isEmail ignoring trailing newlines#285

Merged
timostamm merged 1 commit intosayers/validation_upgradesfrom
tstamm/Fix-isEmail-ignoring-trailing-newlines-
Apr 15, 2025
Merged

Fix isEmail ignoring trailing newlines#285
timostamm merged 1 commit intosayers/validation_upgradesfrom
tstamm/Fix-isEmail-ignoring-trailing-newlines-

Conversation

@timostamm
Copy link
Member

isEmail incorrectly returns true for the input foobar@example.com\n. This happens because $ will match a line ending even without the multiline flag with re.match. We need to use re.fullmatch instead.

@timostamm timostamm merged commit fb0cfad into sayers/validation_upgrades Apr 15, 2025
8 checks passed
@timostamm timostamm deleted the tstamm/Fix-isEmail-ignoring-trailing-newlines- branch April 15, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments