DS.FilteredRecordArray

DS.FilteredRecordArray Class Extends: DS.RecordArray Defined in: addon/-private/system/record-arrays/filtered-record-array.js:10 Module: ember-data Represents a list of records whose membership is determined by the store. As records are created, loaded, or modified, the store evaluates them to determine if they should be part of the record array.

DS.Errors#_registerHandlers()

_registerHandlersprivate Defined in addon/-private/system/model/errors.js:111 Register with target handler

DS.Errors#_clear()

_clearprivate Defined in addon/-private/system/model/errors.js:379 Removes all error messages. to the record.

DS.Errors#remove()

remove (attribute) deprecated Defined in addon/-private/system/model/errors.js:280 Removes all error messages from the given attribute and sends becameValid event to the record if there no more errors left. Example: app/models/user.js import DS from 'ember-data'; export default DS.Model.extend({ email: DS.attr('string'), twoFactorAuth: DS.attr('boolean'), phone: DS.attr('string') }); app/routes/user/edit.js import Ember from 'ember'; export default Ember.Route.extend({ actions: {

DS.Errors#_add()

_addprivate Defined in addon/-private/system/model/errors.js:241 Adds error messages to a given attribute without sending event.

DS.Errors#unknownProperty()

unknownPropertyprivate Defined in addon/-private/system/model/errors.js:184

DS.Errors#_findOrCreateMessages()

_findOrCreateMessagesprivate Defined in addon/-private/system/model/errors.js:255

DS.Errors#isEmpty

isEmpty{Boolean} Defined in addon/-private/system/model/errors.js:202

DS.Errors#has()

has (attribute) Boolean Defined in addon/-private/system/model/errors.js:405 Checks if there is error messages for the given attribute. app/routes/user/edit.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { save: function(user) { if (user.get('errors').has('email')) { return alert('Please update your email before attempting to save.'); } user.save(); } } }); Parameters: attribute String Returns: Boolean true i

DS.Errors#messages

messages{Array} Defined in addon/-private/system/model/errors.js:158 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}}