a992065d6cd970630b86e6dd81b0cd11af6e9454
Replace the RFC 5322 mega-regexp with net/mail.ParseAddress, which is the standard library's address parser and far easier to audit. A bare address is required: inputs with a display name, angle brackets, a comment, or trailing content are rejected, as is an address list. Behaviour change: ParseAddress does not require the domain to contain a dot, so "alice@localhost" now validates. Layer Match or a DNS lookup on top if a stricter domain is needed. Also rewrites FuzzEmail, which previously asserted that *every* input is invalid, into checks that Email never returns an unexpected error type, never panics, and gives a stable verdict. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Go Validate
A suite of straightforward validation functions. You put something in, you get back nil or an error.
License
See LICENSE.md
Languages
Go
100%