lcoq/ember-validations — pull request #10 by sohara (2012-11-20 19:44:22+00:00)
Title: Documentation fix

It seems the example in the README of using an in-line custom validator function within the validations object doesn't work with the current interfaces.

1. The example currently uses `this.get('validationErrors')` but `this` refers to the `Ember.Validator` instance, not the object, therefore the passed in reference to the object should used.

2. The `Ember.ValidationErrors.add` function takes 4 arguments:
`add: function(attributePath, key, format, customMessage) {...`
So I suppose if we want to just pass in a custom message (one that doesn't have a registered key in the `Ember.ValidationError.messages` object) then we must pass null or for the `key` and (optionally) the `format` arguments.

Unless I'm missing something.