Comment

Comment by tedmiston

Hmm, sorry but I don't buy that the "correct way to validate" is not to validate the input.

Email addresses aren't a special enough case to be handled differently than any other user input, which we always validate to both sanitize and show client-side errors, if nothing else.

Sure, the complete regex is complex, but it is defined and is hardly unconquerable. Look at Django's `EmailValidator` implementation for example [0] that is mature and well tested [1].

The author has not convinced me that ignoring validation is the right choice when options with a scope so thorough exist.

[0]: https://github.com/django/django/blob/master/django/core/val...

[1]: https://github.com/django/django/blob/a9215b7c36bff232bcc941...

parent tedmiston 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton