Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Pull request Compare This branch is 4 commits behind DavyJonesLocker:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status Dependency Status Code Climate

Ember plugin for ClientSideValidations



Run the install generator to get the initializer:

rails g client_side_validations:ember:install

This will copy client_side_validations-ember.rb to config/initializers. You need to declare the Ember models you want to have bootstrapped with server-side validations and how those models map to their server-side counterparts.

The hash should have keys that are string representations of the server-side models and values that are string representations of the client-side models they map to.

ClientSideValidations::Ember.configure do |config
  config.models = { 'User' => 'App.User', 'Profile' => 'App.Profile' }

Asset Pipeline

In your Gemfile add the following:

gem 'ember'
gem 'client_side_validations'
gem 'client_side_validations-ember'

Order matters here. Ember and ClientSideValidations need to be required before ClientSideValidations-Ember.

Follow the remaining installation instructions for ClientSideValidations

Add the following line to app/assets/javascripts/application.js

//= require rails.validations.ember

Again, order matters. You should add this line after the require for rails.validations as well as all of your Ember code.

If the asset pipeline is disabled the asset file will be copied into public/javascripts when the ClientSideValidations install generator is run.

At any time you can copy the asset file into your project by running:

rails g client_side_validations:copy_assets

If the asset pipeline is disabled the asset file will be copied into public/javascripts. Otherwise the asset file will be copied into app/assets/javascripts (or whatever asset directory you have defined)


Brian Cardarella

We are very thankful for the many contributors


This gem follows Semantic Versioning

Major and minor version numbers will follow Rails's major and minor version numbers. For example, client_side_validations-ember-0.5.0 will be compatible up to ~> ember-0.5.0

Want to help?

Please do! We are always looking to improve this gem. Please see our Contribution Guidelines on how to properly submit issues and pull requests.


DockYard, LLC © 2012


Licensed under the MIT license

Something went wrong with that request. Please try again.