3 ms·
It seems ridiculous to apply form validation to a name, given the complexity of charsets involved. I don't even validate email addresses. I remember [this](http
by KPGv2 2y ago
It seems ridiculous to apply form validation to a name, given the complexity of charsets involved. I don't even validate email addresses. I remember [this](https://www.netmeister.org/blog/email.html https://www.netmeister.org/blog/email.html) wonderful explainer of why your email validation regex is wrong.
- nedt 2y agoIn HTML if you use <input type="email"> you basically get a regex validation. While it not fully follows the RFC it's a good middle ground. And it gives you an email that you can use on the internet (RFC obviously has some cases that are outside of this scope). That's why I tend to prefer what's defined in the standard: https://html.spec.whatwg.org/multipage/input.html#email-state-(type=email) https://html.spec.whatwg.org/multipage/input.html#email-stat...
- deleted 2y ago[deleted]