-
-
Notifications
You must be signed in to change notification settings - Fork 217
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 validation: provide spec validation #204
Comments
Here is some more context on this issue. Currently, our On the one hand, the validation is more secure as it excludes various special characters like The downside is that this regex differs from the standard and does not allow email addresses that use an IP address at the end, for example. If this behavior is needed, our W3C Working Draft Regex from w3.org:
HTML Standard Regex from whatwg.org:
This issue was created, as described above, to get feedback to see if there is a need to add, for example, a |
Plus, the spec allows emails like: which are both emails that are valid, but contain characters that are rarely encountered. |
I don’t think there is so much a need to add the In other words, I think there should be only one email validation method, That’s because the Valibot users (I mean the programmers) would not be able to easily decide which email method to choose, since there is a little difference between email() and specEmail(), and both of them are based on different standards. Who can predict the application users would type rarely encountered characters or not? What do you guys think about this? |
I share the same opinion. |
Yes, I can understand the argument too. 😄
I agree with you, so I think we also have to add some explanation to the email regex doc in Valibot website, which says that ' or ` is an allowed character and would lead to accidental security issues. In short, implementing |
I decided against the RFC standard for the regex of If there are any counter arguments against my decision, feel free to create a new issue for this topic in order to get feedback from more people. This issue is meant for people to submit use cases where |
The currently used email regex does not match emails according to the spec, which means emails that browsers accept, will be rejected by valibot (by design)
So we want to use this issue to find out if others would be interested in using a regexp that validates more emails: #180 (comment)
The text was updated successfully, but these errors were encountered: