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

Improve the email field validation in the home page #539

Conversation

javisperez
Copy link
Contributor

This PR uses a custom (better?) regexp pattern to validate emails in the newsletter subscription form.

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

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

What, no +emails?

@javisperez
Copy link
Contributor Author

That my friend @amisevsk was a bug :D nice catch. Updated it to suppot common email characters like -, +, . and _

@@ -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]+)*$"
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@javisperez javisperez merged commit 276e042 into jozu-ai:main Oct 17, 2024
3 checks passed
@javisperez javisperez deleted the 464-ui-update-the-email-pattern-regex-from-forms branch October 17, 2024 19:46
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.

3 participants