Class Errors

public

Holds validation errors for a given record, organized by attribute names.

This class is not directly instantiable.

Every Model has an errors property that is an instance of Errors. This can be used to display validation error messages returned from the server when a record.save() rejects.

For Example, if you had a User model that looked like this:

```js {data-filename=app/models/user.js} import Model, { attr } from '@ember-data/model';

export default class UserModel extends Model {

Show:

true if we have no errors.

Total number of errors.

An array containing all of the error messages for this record. This is useful for displaying all errors to the user.

{{#each @model.errors.messages as |message|}}
  <div class="error">
    {{message}}
  </div>
{{/each}}