Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>ActiveRecord en.yml is the answer I would suggest if you want to change the Validation Message for Devise </p> <p>Here is how the en.yml should look like </p> <pre><code>en: activerecord: errors: models: user: attributes: email: blank: "Please Specify an Email id" taken: "Please use a different Email id" invalid: "Please Specify a valid Email id" password: blank: "Please Specify a Password" confirmation: "Password does not match" password_confirmation: blank: "Please Specify a Password Confirmation" first_name: blank: "Please Specify First Name" last_name: blank: "Please Specify Last Name" pdf: attributes: name: blank: "Please Specify name to PDF" taken: "Please use different name for PDF" attachment: blank: "Please Upload a PDF Attachment" data_element: attributes: name: blank: "Please give Element a desired name" taken: "Already Created Element with given name" color: blank: "Please assign a color to Element" template: attributes: name: blank: "Please Specify a Name" taken: "Please use a different name" </code></pre> <p>I advice you to define this way instead of customizing devise validation module</p> <p>Because if you follow the above approach, it would be possible that you would skip a validation a place or two</p> <p>for Example I the remove the above devise validation module and then substitue your own in User Model</p> <p>then all the validation would work for but you would miss the validation in Change Password </p> <p>There by resulting your to login even though the password was never supplied and never given</p> <p>Keep a loop of that too</p> <p>Cheer</p> <p>Regards</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload