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

z.string().email() allows slash in domain #2169

Closed
the-bayer opened this issue Mar 8, 2023 · 4 comments
Closed

z.string().email() allows slash in domain #2169

the-bayer opened this issue Mar 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@the-bayer
Copy link

Hello!

We noticed that parsing with z.string().email() method allows a slash in the domain of an email. However, I think I found the regex you use for checking emails, and a slash in the email does not match that regex, so it seems like this is a bug. Let me know if you have any other questions.

@JacobWeisenburger JacobWeisenburger added the enhancement New feature or request label Mar 8, 2023
@joaoGabriel55
Copy link

I can work on that

@joaoGabriel55
Copy link

I saw here before start implementing and use slash for email is valid (e.g. test/[email protected]), take a look in this links:
https://en.wikipedia.org/wiki/Email_address#Local-part
https://www.ietf.org/rfc/rfc2822.txt

You can use this online validator too:
https://verifalia.com/validate-email

@colinhacks
Copy link
Owner

This is already addressed by #2157 @joaoGabriel55

Trying to save you some effort 🙏

@the-bayer
Copy link
Author

@colinhacks Thanks for that change btw, super helpful 🙌🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants