From 8b600b08008110d586643802e0c70d6bfd65c19e Mon Sep 17 00:00:00 2001 From: Micke Lisinge Date: Mon, 10 Aug 2020 14:03:22 +0200 Subject: [PATCH] Re-add check that was introduced in #136 --- lib/valid_email2/address.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/valid_email2/address.rb b/lib/valid_email2/address.rb index 73f00e9..9e79eb1 100644 --- a/lib/valid_email2/address.rb +++ b/lib/valid_email2/address.rb @@ -41,7 +41,9 @@ def valid? # Domain may not start with a dash !domain.start_with?('-') && # Domain name may not end with a dash - !domain.include?('-.') + !domain.include?('-.') && + # Address may not contain a dot directly before @ + address.include?('.@') else false end