I\'m using devise as authentication engine in my app. Is there any way to use custom messages when devise validation fails. Devise provides me with the following message whe
Please refer to the URL below.
http://railscasts.com/episodes/210-customizing-devise?view=asciicast
If the user is signing in, you can edit all the error messages in devise.en.yml under config/locales.
If you're signing up, Devise provides its own validations out of the box without any customizing. If you want to customize it, you can edit the User model.
Find devise :validatable and remove the :validatable option. After which, you should be able to use the usual rails validations. Note that this will cause you to have to do all the validations yourself.
validates_presence_of :password, :message=>"Your custom error message!"
Some usual validations:
validates_confirmation_of :password
validates_presence_of :password, :on => :create
validates_presence_of :email
validates_uniqueness_of :email