Validation error messages for JS

Hello,

I try to create javascript client side form validation for rails models
and
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
object
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
in
order to display them with javascript before form is submitted and
values
is attached to model and model is validated. I want to display error to
the
user before form submittion.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs