From 02942252697c73439cb40cdf7d21d223a960a113 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Tue, 11 Oct 2022 20:43:01 +0200 Subject: [PATCH] typoed_email_validator: add new endings to the typo list gmail.co.uk is registered by the big ad company with the 5000 chat apps, but it doesn't have a NX record --- 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 d4f4b84a..dc80bb2a 100644 --- a/app/validators/typoed_email_validator.rb +++ b/app/validators/typoed_email_validator.rb @@ -18,6 +18,7 @@ class TypoedEmailValidator < ActiveModel::EachValidator gmaik.com gmail.cm gmail.co + gmail.co.uk gmaile.com gmaill.com gmali.com diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index f0e3803c..3250d212 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -84,6 +84,7 @@ RSpec.describe User, type: :model do include_examples "invalid email", "fritz.fantom@gmaik.com" include_examples "invalid email", "fritz.fantom@gmail.cm" include_examples "invalid email", "fritz.fantom@gmail.co" + include_examples "invalid email", "fritz.fantom@gmail.co.uk" include_examples "invalid email", "fritz.fantom@gmailcom" include_examples "invalid email", "fritz.fantom@gmaile.com" include_examples "invalid email", "fritz.fantom@gmaill.com"