Email Validation doesn't accept some valid email addresses #385
Labels
No labels
bug
chore
documentation
enhancement
help
in-progress
question
ready-for-release
released
translation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/gate#385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug:
Some valid email addresses are not accepted by the system and instead show "Not a valid email".
To Reproduce:
Enter
~@example.com敏萱@example.comboth of which are valid emails.
Expected behavior:
I can enter my email and use it to receive mails to.
Screenshots:
Additional context:
This issue stems from zod's too restrictive Regex for email validation. Funnily enough, just a few lines higher, there is a comprehensive regex that would actually properly recognise these email addresses but it has been commented out for performance reasons and because it didn't support unicode. Validating an email on regex101 was sub 0.001 ms, which in my opinion doesn't qualify it to be a bottleneck. It also happens to recognise the chinese emails and most of its filters are unicode codepoints. The regex in question is:
Granted, not exactly readable, but it's doubtful that this is a part that has to be updated regularly. Email adresses have been a rather stable format so far.
This should be fixed in the latest release v1.12.4