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
Safari Unsupported Email Regex #1668
Comments
There is a WebKit PR open to implement lookbehind as well. |
I'm open to switching a regex without a negative look-behind. Open to proposals here. |
But we should revert #1648 until there's a solution found since it silently breaks apps for safari users. |
Just reverted, landing in 3.20.2 momentarily |
AnatoleLucet
added a commit
to AnatoleLucet/zod
that referenced
this issue
Dec 12, 2022
AnatoleLucet
added a commit
to AnatoleLucet/zod
that referenced
this issue
Dec 12, 2022
AnatoleLucet
added a commit
to AnatoleLucet/zod
that referenced
this issue
Dec 13, 2022
iduuck
added a commit
to iduuck/groqd
that referenced
this issue
Dec 14, 2022
gksander
added a commit
to FormidableLabs/groqd
that referenced
this issue
Dec 14, 2022
* update zod to 3.20.2 (fixes #8) see more colinhacks/zod#1668 (comment) * Update yarn.lock Co-authored-by: Grant Sander <gksander93@gmail.com>
colinhacks
pushed a commit
that referenced
this issue
Dec 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The email regex defined here https://github.com/colinhacks/zod/blob/master/src/types.ts#L518 is not supported on Safari.
This is the problematic capture group:
(?<!-)
. This is a negative lookbehind, which isn't supported on Safari https://caniuse.com/js-regexp-lookbehind. Sorry, I'm not sure what it should be re-written to, but I find that https://regexr.com/ is fantastic for testing regular expressions (and highlights the issue with the negative lookbehind too).The text was updated successfully, but these errors were encountered: