-
Notifications
You must be signed in to change notification settings - Fork 51
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
Improve the email field validation in the home page #539
Improve the email field validation in the home page #539
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What, no +emails?
That my friend @amisevsk was a bug :D nice catch. Updated it to suppot common email characters like |
@@ -125,6 +125,7 @@ const subscribeToNewsletter = async () => { | |||
:disabled="isBusy" | |||
id="email" | |||
type="email" | |||
pattern="^[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we improve it so that we allow for name+test@mymail.com
kind of mails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i just push a fix right before this comment :D it was my mistake, give it another try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the commit b550fd0
This PR uses a custom (better?) regexp pattern to validate emails in the newsletter subscription form.