From 03f4c214b459a241a1aab08095a986475bd6f8f0 Mon Sep 17 00:00:00 2001 From: takayamaki Date: Tue, 29 May 2018 02:14:24 +0900 Subject: [PATCH] fix: Don't validate MX record in development (#7654) --- app/validators/email_mx_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb index d4c7cc252a..3cc5853c6e 100644 --- a/app/validators/email_mx_validator.rb +++ b/app/validators/email_mx_validator.rb @@ -4,7 +4,7 @@ require 'resolv' class EmailMxValidator < ActiveModel::Validator def validate(user) - return if Rails.env.test? + return if Rails.env.test? || Rails.env.development? user.errors.add(:email, I18n.t('users.invalid_email')) if invalid_mx?(user.email) end