dockyard/ember-validations — pull request #159 by royk (2014-08-06 09:18:07+00:00)
Title: Support dynamic/per-model validators by allowing a function that returns...

... a validator object.

This solves a problem I had, where I wanted each model to have a different validation object.
In the controller, the validation object looks like this:
validations: {
value: function() {
return this.get("validator");
}
}

And the models look like this:
{.... validator: {presence: true}}
{.... validator: {numericality: {onlyInteger:true, greaterThan: 0}}}

Not sure if there is already another way to solve this with ember-validations. This is my first Ember project and I'm just getting started with it. But just in case this happens to be useful I thought I'd share.