mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Run validations even when password change will fail, to show a complete list of errors
This commit is contained in:
parent
4bcd1c6fcd
commit
a8d88d193e
1 changed files with 2 additions and 1 deletions
|
@ -59,8 +59,9 @@ module Devise
|
|||
result = if valid_password?(current_password)
|
||||
update_attributes(params)
|
||||
else
|
||||
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
|
||||
self.attributes = params
|
||||
self.valid?
|
||||
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
|
||||
false
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue