Forum: Ruby on Rails Validation error messages for JS

C608e4424e9c8d08c6ae839a87ab2941?d=identicon&s=25 Dalibor Zdravkovic (Guest)
on 2014-03-22 16:39
(Received via mailing list)

I try to create javascript client side form validation for rails models
I don't wont to duplicate error messages in language yml files (one for
models and one for javascript). I wont for example to generate json
with list of all available error messages for some active record rails
model. Is there any way to get these error messages before I validate
model. In rails documentation model.errors is available after validation
order to display them with javascript before form is submitted and
is attached to model and model is validated. I want to display error to
user before form submittion.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.