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

Email with long value is slowing down and crashing #405

Merged
merged 3 commits into from
May 18, 2020

Conversation

LouiaR
Copy link
Contributor

@LouiaR LouiaR commented May 13, 2020

@LouiaR LouiaR added the bug label May 13, 2020
@LouiaR LouiaR self-assigned this May 13, 2020
@LouiaR LouiaR requested a review from AndyEPhipps May 13, 2020 14:50
@AndyEPhipps
Copy link
Contributor

@LouiaR can you explain what this change is doing please?

@LouiaR
Copy link
Contributor Author

LouiaR commented May 13, 2020

@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 agdbdreyrugjgghgkadqewyeorpfkhi@jruqpalkdidhhagtryhfhf the typing is slowed, if user still keep continuing entering more chars then suddenly keys are frozen.

@AndyEPhipps
Copy link
Contributor

@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 agdbdreyrugjgghgkadqewyeorpfkhi@jruqpalkdidhhagtryhfhf the typing is slowed, if user still keep continuing entering more chars then suddenly keys are frozen.

Nah I mean I understand the problem, but why does changing the regex fix it?

@LouiaR
Copy link
Contributor Author

LouiaR commented May 13, 2020

@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 agdbdreyrugjgghgkadqewyeorpfkhi@jruqpalkdidhhagtryhfhf the typing is slowed, if user still keep continuing entering more chars then suddenly keys are frozen.

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

@AndyEPhipps
Copy link
Contributor

@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 agdbdreyrugjgghgkadqewyeorpfkhi@jruqpalkdidhhagtryhfhf the typing is slowed, if user still keep continuing entering more chars then suddenly keys are frozen.

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

@AndyEPhipps AndyEPhipps reopened this May 13, 2020
@AndyEPhipps
Copy link
Contributor

whoops

AndyEPhipps
AndyEPhipps previously approved these changes May 14, 2020
@LouiaR LouiaR requested a review from adamclark-dev May 18, 2020 15:08
@adamclark-dev adamclark-dev removed their request for review May 18, 2020 15:22
@AndyEPhipps AndyEPhipps self-requested a review May 18, 2020 15:30
@@ -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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops forgot this
Done

Copy link
Contributor

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

@AndyEPhipps AndyEPhipps merged commit 898a2e3 into master May 18, 2020
@adamclark-dev
Copy link
Contributor

🎉 This PR is included in version 1.25.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AndyEPhipps AndyEPhipps deleted the fix/fix_email_validation branch May 18, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email with long value is slowing down and crashing
3 participants