mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
fix: Don't validate MX record in development (#7654)
This commit is contained in:
parent
c0355878ba
commit
03f4c214b4
@ -4,7 +4,7 @@ require 'resolv'
|
|||||||
|
|
||||||
class EmailMxValidator < ActiveModel::Validator
|
class EmailMxValidator < ActiveModel::Validator
|
||||||
def validate(user)
|
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)
|
user.errors.add(:email, I18n.t('users.invalid_email')) if invalid_mx?(user.email)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user