dockyard/ember-validations — pull request #22 by arenoir (2013-05-22 00:53:39+00:00)
Title: Add custom validator

Added a local validator `custom`. It takes only one option, a string naming the function it will run on validation.

```Javascript

App.Task.reopen({
validations: {
start: {
custom: 'validateStartIsBeforeStop'
}
}

validateStartIsBeforeStop: function() {
if ( this.get('start') > this.get('stop') ) {
return 'Start must be before stop';
}
}
});
```

I don't know if this is the ideal way to define custom validators but it gets the job done. I hope this or something like it makes the cut.