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

Update the email regex to allow dashes in domain names when subdomains are present #2224

Closed
wants to merge 1 commit into from

Conversation

TomasHubelbauer
Copy link

Hi, as of current, tom@test.test.com passes the email validation regex but tom@test.te-st.com doesn't.

This PR fixes that.

I see you already have #2157 going so maybe this PR is not all that needed. I will comment on that PR, too. But I had to figure this regex out to make it work for my usecase (where I will switch to using .regex) so I figured I'd share my finding anyway and if there's no interest in changing the regex at this point, no hard feelings.

…s are present

The regex can parse tom@test.test.com now but not tom@test.te-st.com.
@netlify
Copy link

netlify bot commented Mar 21, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8f7e8e0
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/6419d81e3acf9200086ea4f7
😎 Deploy Preview https://deploy-preview-2224--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@niklashigi
Copy link
Contributor

Hey @colinhacks, would really appreciate it if this could be merged soon! 🙏

The current regex is failing for a lot of valid email addresses and this PR seems like an uncontroversial quick fix before any larger changes discussed in #2157.

ewen-lbh added a commit to inp-net/loca7 that referenced this pull request Apr 24, 2023
@TomasHubelbauer TomasHubelbauer closed this by deleting the head repository May 6, 2023
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