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

fix(email_validator): handle trailing whitespace in emails #255

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

stulzer
Copy link
Contributor

@stulzer stulzer commented Oct 1, 2024

  • Updated email_validator to strip trailing whitespace from emails when the multiple option is enabled.
  • Added a test case to ensure emails with trailing whitespace are considered invalid.

Stripping on sanitized values make sense with the multiple option is activated and the input is an string. Otherwise it can lead into emails being stored with trailing whitespace on the DB.

- Updated email_validator to strip trailing whitespace from emails
  when the `multiple` option is enabled.
- Added a test case to ensure emails with trailing whitespace are
  considered invalid.
@micke micke merged commit a06fdf7 into micke:main Oct 20, 2024
6 checks passed
@micke
Copy link
Owner

micke commented Oct 20, 2024

Thanks!

@stulzer stulzer deleted the trailing-whitespace branch October 20, 2024 12:42
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