Open AudreyBeard opened 1 year ago
I do agree that regexp for the correct email is complex. But I also want to point out that all variations of the valid email are rarely used. That's why the current implementation is capturing the most commonly used email formats.
Whatever the current solution is, it is not set in stone. If you have an email address that the current pattern does not match, you are free to update the pattern yourself. If you think there is a better solution to verify email address correctness, feel free to share.
You've got a fair point; it sounds like a low-priority (and perhaps low-effort) task. In the meantime I suppose we can continue updating the regex when issues arise.
I'd love to contribute here, but I've got no experience with TypeScript (or any front-end work really), so I'm probably not the best person to work on this issue specifically.
Maybe a good first issue for someone with more experience and interest in TS or front-end development?
Describe the enhancement you'd like Replace regex-based email validation with something more robust & easier to read
Describe why this will benefit the LibrePhotos It appears the general consensus on email validation is that regex is a suboptimal solution. I'm no expert here, but some compelling arguments I've seen are:
The current solution for email validation has proven problematic at least twice, including #689, #637; perhaps more.
Additional context This SO post shows exactly how complicated a "proper" regex-based email validator would be, and it's essentially impossible to read: