typoed_email_validator: add new endings to the typo list

This commit is contained in:
Georg Gadinger 2022-07-24 21:43:28 +02:00
parent 66cd8bfb2a
commit 5b70be74c2
2 changed files with 4 additions and 0 deletions

View File

@ -21,10 +21,12 @@ class TypoedEmailValidator < ActiveModel::EachValidator
gmaill.com gmaill.com
gmali.com gmali.com
hotamil.com hotamil.com
hotmai.com
hotmaill.com hotmaill.com
iclooud.com iclooud.com
iclould.com iclould.com
icluod.com icluod.com
yahooo.com
].map { "@#{_1}" } ].map { "@#{_1}" }
].freeze ].freeze

View File

@ -88,11 +88,13 @@ RSpec.describe User, type: :model do
include_examples "invalid email", "fritz.fantom@gmaill.com" include_examples "invalid email", "fritz.fantom@gmaill.com"
include_examples "invalid email", "fritz.fantom@gmali.com" include_examples "invalid email", "fritz.fantom@gmali.com"
include_examples "invalid email", "fritz.fantom@hotamil.com" include_examples "invalid email", "fritz.fantom@hotamil.com"
include_examples "invalid email", "fritz.fantom@hotmai.com"
include_examples "invalid email", "fritz.fantom@hotmailcom" include_examples "invalid email", "fritz.fantom@hotmailcom"
include_examples "invalid email", "fritz.fantom@hotmaill.com" include_examples "invalid email", "fritz.fantom@hotmaill.com"
include_examples "invalid email", "fritz.fantom@iclooud.com" include_examples "invalid email", "fritz.fantom@iclooud.com"
include_examples "invalid email", "fritz.fantom@iclould.com" include_examples "invalid email", "fritz.fantom@iclould.com"
include_examples "invalid email", "fritz.fantom@icluod.com" include_examples "invalid email", "fritz.fantom@icluod.com"
include_examples "invalid email", "fritz.fantom@yahooo.com"
# gail.com would be a valid email address, but enough people typo it # gail.com would be a valid email address, but enough people typo it
# #
# if you're the owner of that TLD and would like to use your email on # if you're the owner of that TLD and would like to use your email on