I’m trying to set form validation with cyrillic alphabet but I get
We're sorry, but something went wrong.
Here is the code that I use
validates_presence_of :user, :message => "кирилица"
What is wrong here ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You forgot to tell ruby that your source file is in utf-8
Ruby 1.9 assumes your source files are US-ASCII encoded unless you provide an
comment at the beginning of your source file
PS : I would suggest you to use i18n to store your validation messages. You can find info about the mechanism here, it will allow you to either change default messages or specific messages for a model.