Skip to content

Commit

Permalink
Re-add check that was introduced in #136
Browse files Browse the repository at this point in the history
  • Loading branch information
micke committed Aug 10, 2020
1 parent 8d3b362 commit 8b600b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/valid_email2/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b600b0

Please sign in to comment.