-
Notifications
You must be signed in to change notification settings - Fork 1
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
Email with long value is slowing down and crashing #405
Conversation
@LouiaR can you explain what this change is doing please? |
I change the regex used for email validation, as when the email is too long like |
Nah I mean I understand the problem, but why does changing the regex fix it? |
It stops slowing down effect when typing and keys being in frozen state |
|
whoops |
@@ -1,7 +1,8 @@ | |||
const defaultValidationPatterns = { | |||
tel: /^[0-9 ]{11,}$/, | |||
number: /^[0-9]+$/, | |||
email: /^([A-Za-z0-9_+-]+\.?)*[A-Za-z0-9_+-]+@[A-Za-z0-9]+([A-Za-z0-9_-]+\.?)*[A-Za-z0-9]+\.[A-Za-z]{2,}$/, | |||
// eslint-disable-next-line no-useless-escape |
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.
Were you not able to get around this? Not a big deal, but we're gonna have to use this pattern in multiple projects; would be nice to get it clean
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.
Oops forgot this
Done
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.
Thanks man, will doublecheck once the test env has rebuilt
🎉 This PR is included in version 1.25.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes comicrelief/giftaid-react#250