diff --git a/lib/email_veracity/domain.rb b/lib/email_veracity/domain.rb index 9b23bde..5e2253f 100644 --- a/lib/email_veracity/domain.rb +++ b/lib/email_veracity/domain.rb @@ -50,13 +50,13 @@ def validate! add_error(:blacklisted) if blacklisted? && Config[:enforce_blacklist] unless Config[:skip_lookup] - add_error(:no_records) if servers.empty? && - !Config.enforced_record?(:a) && - !Config.enforced_record?(:mx) - add_error(:no_address_servers) if address_servers.empty? && - Config.enforced_record?(:a) - add_error(:no_exchange_servers) if exchange_servers.empty? && - Config.enforced_record?(:mx) + add_error(:no_records) if !Config.enforced_record?(:a) && + !Config.enforced_record?(:mx) && + servers.empty? + add_error(:no_address_servers) if Config.enforced_record?(:a) && + address_servers.empty? + add_error(:no_exchange_servers) if Config.enforced_record?(:mx) && + exchange_servers.empty? end end