dockyard/ember-validations — pull request #14 by diogomafra (2013-04-16 17:49:35+00:00)
Title: A model that is not "dirty" can't transition to "uncommitted".

When a ember-data model is validated, the validator changes its state to 'uncommitted', but it fails silently when the model is not dirty. It does not show any error because the deferred is not catching the errors.

You can see the problem adding this code on line 83 of `mixin.js`: `.then(null, function(err){alert(err);});` . The could should look like this:

```javascript
// Line: 71
return Ember.RSVP.all(deferreds).then(function() {
if (object.get('stateManager')) {
if (Object.keys(object.errors).length === 0) {
object.get('stateManager').transitionTo('uncommitted');
} else {
object.get('stateManager').transitionTo('invalid');
}
} else {
object.set('isValid', Object.keys(object.errors).length === 0);
}
}).then(null, function(err){alert(err);});
```

And then, just try to validate a model that is not dirty: `App.MyModel.find(1).validate()`.

It throws this error: `Error: assertion failed: Could not find state for path: "uncommitted"`.