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

Fixes a bug in my previous PR. #540

Conversation

javisperez
Copy link
Contributor

This PR removes the use of lookahead in the previous pr because we cant use it in input fields...

@@ -125,7 +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-Z]{2,}$"
pattern="^[a-zA-Z0-9]+([._+\-][a-zA-Z0-9]+)*@[a-zA-Z0-9\-]+\.[a-zA-Z]{2,}$"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need to escape the - -- if it's at the end of the range it's treated as a character (at least in regex parsers I'm familiar with)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats what was my thinking too, but if i dont i get an invalid range error :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

check how i escaped both dashes, in the user and in the domain. #fun

@javisperez javisperez merged commit c4df156 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 20:32
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