Devise raise validations error when new and old passwords are same

Letting users to change their password is a very common feature. In this post we will be exploring the solution for raising validations error when they try to change their password but add the same old password again.


![cover: [Solved] Ubuntu 22 Temporary failure in name resolution](/static/6eefc6edc396b4c924f514c350cc3956/d743e/ubuntu-temporary-failure-in-name-resolution.webp)
![cover: [Solved] Error while Installing mysql2 Gem in M1 Mac](/static/f5b8999323303e8ccaf567e19aff444f/99768/error-while-installing-mysql2-in-m1-mac.webp)
![cover: [Solved] .rbenv/shims/ruby: Argument list too long](/static/3c40cfa3cce40ce5f34d9d17acc897e6/2d181/rbenv-shims-ruby-argument-list-too-long.webp)


![cover: [Fix] Rails Auto Increment ID Postgres Error](/static/4dd88049c68f30736f5c00463711acd6/91169/fix-rails-auto-increment-id-postgres-error.webp)
![cover: [Fix] Rails server is already running](/static/a90549047699e52459a05e4a7abe2ef2/2d181/fix-rails-server-is-already-running.webp)
![cover: [Fix] Issue while installing ruby with rbenv in M1 Mac](/static/9ad8b408943c268775a6b158c19e1849/2d181/cover.webp)