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

Remove unnecessary form validation for email #327

Merged
merged 1 commit into from
May 27, 2019

Conversation

mckennapsean
Copy link
Collaborator

The HTML 5 form input type of email already handles
email validation. There are cases that are allowed by
HTML5 (e.g., "a@a") which our form used to detect
and notify the user. Since these are less likely to
happen, and the logic is still not fool-proof, simplify
the code and assumptions made therein to be
more generalizable and thus more robust. This is
supported in all modern browsers, and I tested
this also in Edge to verify that it works there, too.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email

The HTML 5 form input type of email already handles
email validation. There are cases that are allowed by
HTML5 (e.g., "a@a") which our form used to detect
and notify the user. Since these are less likely to
happen, and the logic is still not fool-proof, simplify
the code and assumptions made therein to be
more generalizable and thus more robust. This is
supported in all modern browsers, and I tested
this also in Edge to verify that it works there, too.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email
Copy link
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mckennapsean agreed. this can/should be simplified. thanks for removing. 👍

@nelsonic nelsonic merged commit 1ea724e into master May 27, 2019
@nelsonic nelsonic deleted the remove-unnecessary-validation branch May 27, 2019 08:00
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