re: Properly validating e-mail addresses VIEW POST


More than that, in most languages and frameworks, there's already some perfectly working validation mechanisms, so there's pretty much no need to validate an e-mail by "our" own logic.

Adding this small C library is awesome anyways, thanks for the ref.


I have tried some of the "perfectly working" mechanisms. Even if your language has one, it will most likely not cover corner cases. (I admit to not have tried every single one.)


In my case, PHP (the filter_var method) is known to be technically "perfectly" working (and I also admit I didn't try any extreme case, even if I tried some already serious cases).

I have just tested a local address with an emoji. PHP does not accept that.

Seems like PHP implementation is perfect, but they check against older RFC.

Isn't emojis in domain names a hasardous spec anyways ? (talking in terms of support and implementations).

So the PHP implementation becomes increasingly less usable as more and more Unicode domains are registered.

Hazardous, but rule-compliant. libvldmail has a compiler flag for that, so you could make it reject them if needed.

Yeah, beyond just pure technical ability to validate email address against rules, it's a weird one on so many levels:

Can see pros and cons which ever way you go, tho having a dedicated library does help with faster updates over built in functions that might take years to release next version.

code of conduct - report abuse