From ce7a08e836334bdfc803907fb34a0a306f6c9920 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 20 Nov 2023 15:09:22 +0000 Subject: [PATCH] Update validation/error message order for password --- 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 7042034b4..135d85428 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -15,8 +15,8 @@ class User < ApplicationRecord validates :email, uniqueness: { allow_blank: true, case_sensitive: true, if: :will_save_change_to_email? } validates :email, format: { with: Devise.email_regexp, allow_blank: true, if: :will_save_change_to_email? } validates :password, presence: { if: :password_required? } - validates :password, confirmation: { if: :password_required? } validates :password, length: { within: Devise.password_length, allow_blank: true } + validates :password, confirmation: { if: :password_required? } after_validation :send_data_protection_confirmation_reminder, if: :is_dpo_changed?