diff options
author | takayamaki <fsgiko@gmail.com> | 2018-05-29 02:14:24 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-28 19:14:24 +0200 |
commit | 03f4c214b459a241a1aab08095a986475bd6f8f0 (patch) | |
tree | 536cfacba2da14ad2f2d440a819200ad8ca5d7eb /app | |
parent | c0355878ba00808d1d8710cb27b1fbb36bcb54e8 (diff) |
fix: Don't validate MX record in development (#7654)
Diffstat (limited to 'app')
-rw-r--r-- | app/validators/email_mx_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb index d4c7cc252..3cc5853c6 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 |