I was asked to add stronger email validation to our forms at work. Honestly, I thought we were overcomplicating it at first.
Then I started looking into the details.
An email can have valid syntax and still come from a disposable provider. A signup form might need to reject certain domains, restrict access to a company, or flag shared addresses like support@ . Someone typing gmial.com probably needs a helpful suggestion.
Those decisions depend on the application. I wanted a way to define them once, inspect the result, and reuse the same policy across projects.
That is what I have been building with mailrules , an MIT-licensed email validation library for JavaScript and TypeScript.
The latest addition is a live playground .…