Devise Not Validating Password/Password Confirmation

If you want Devise to do validations, you need to add the :validatable module to your model. This is fairly easy to do, just add :validatable to the list of module in the devise call, so your model says:

devise
   :database_authenticatable, 
   :lockable, 
   :registerable, 
   :recoverable, 
   :rememberable, 
   :trackable,
   :validatable

This will make devise add validations.

Another easy way is to add your own validations. If you just want to validate that the password confirmation matches, you can add a validates_confirmation_of validation by adding this to your model:

validates_confirmation_of :password

I hope this helps.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)