truemail-rb / truemail

🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
https://truemail-rb.org/truemail-gem
MIT License
1.18k stars 60 forks source link

[BUG] Email addresses with multiple dashes are not allowed #263

Closed Sybe closed 1 year ago

Sybe commented 1 year ago

New bug checklist

Bug description

Email addresses with multiple consecutive dashes in the domain part are not allowed by the regex. For example info@truemail---website.com. According to rfc1035 a domain with multiple dashes is allowed though

Complete output when running truemail, including the stack trace and command used
Truemail::RegexConstant::REGEX_DOMAIN_PATTERN.match?("truemail---website.com")
bestwebua commented 1 year ago

Hi, @Sybe! Thanks for your report. This fix is already in a new release. Cheers!