Why not answer a simple question: DS.ERRORS CLASS?
From the EmberJS docs:
For example, if you had a User model that looked like this:
App.User = DS.Model.extend({ username: attr('string'), email: attr('string') });
And you tried to save a record that was not checked on the server.
var user = store.createRecord('user', { username: 'tomster', email: 'invalidEmail' }); user.save();
Your database data warehouse might return a response that looks like this. This answer will be used to populate the error object.
{ "errors": { "username": ["This username is already taken!"], "email": ["Doesn't look like a valid email."] } }
Errors can be displayed to the user by accessing their property name or by using the messages property to get an array of all errors.
{{#each errors.messages}} <div class="error"> {{message}} </div> {{/each}}
Is this question considered only in model validation? compared to saving / saving, so the data is already clean before it gets to the data store ... It looks like you still want to manage errors at the adapter data store level.
That's all said, why don't you just use template or standard JS checking at the user interface level?
source share