From 3197fd21e41eb1cb4fbd455ca2f657ca359cd125 Mon Sep 17 00:00:00 2001 From: "zyn on thu.closed.social" Date: Wed, 8 Jan 2020 22:11:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E9=82=AE?= =?UTF-8?q?=E7=AE=B1=E6=97=B6=E4=B8=8D=E6=A3=80=E6=9F=A5=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 9a19a53b3..bfabe8987 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -80,7 +80,7 @@ class User < ApplicationRecord accepts_nested_attributes_for :invite_request, reject_if: ->(attributes) { attributes['text'].blank? } validates :locale, inclusion: I18n.available_locales.map(&:to_s), if: :locale? - validates_with BlacklistedEmailValidator, on: :create + validates_with BlacklistedEmailValidator, if: :email_changed? validates_with EmailMxValidator, if: :validate_email_dns? validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create