From 6f2c2654a13648c7a3f74393da2c4668c27886fa Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Sun, 10 Apr 2022 09:55:05 +0200 Subject: [PATCH] typoed_email_validator: add new ending to the typo list --- app/validators/typoed_email_validator.rb | 1 + spec/models/user_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/validators/typoed_email_validator.rb b/app/validators/typoed_email_validator.rb index bf1ab874..90962bb3 100644 --- a/app/validators/typoed_email_validator.rb +++ b/app/validators/typoed_email_validator.rb @@ -17,6 +17,7 @@ class TypoedEmailValidator < ActiveModel::EachValidator gmaill.com gmali.com hotmaill.com + iclould.com icluod.com ].map { "@#{_1}" } ].freeze diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8f285192..2bf6fbb6 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -85,6 +85,7 @@ RSpec.describe User, type: :model do include_examples "invalid email", "fritz.fantom@gmali.com" include_examples "invalid email", "fritz.fantom@hotmailcom" include_examples "invalid email", "fritz.fantom@hotmaill.com" + include_examples "invalid email", "fritz.fantom@iclould.com" include_examples "invalid email", "fritz.fantom@icluod.com" # no TLD include_examples "invalid email", "fritz.fantom@gmail"