From 2174879ece5506522aba84d8587f1a5a698a4771 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Fri, 17 Dec 2021 11:52:29 +0100 Subject: [PATCH] edit profile password field with hints --- app/views/devise/registrations/edit.html.erb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index c4981e938..181540487 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -22,6 +22,15 @@ </div> <div class="col-md-4"> <%= f.input :password, + as: :password_with_hints, + allow_password_uncloaking: true, + validators: { + length: Devise.password_length.first, + uppercase_char: true, + lowercase_char: true, + numeric_char: true, + special_char: Rails.application.config.allowed_special_chars + }, hint: t(".leave_blank_if_you_don_t_want_to_change_it"), required: false, input_html: { autocomplete: "new-password" } %> -- GitLab