Validation error messages for JS


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.