Properties Methods Events Config Options Direct Link
Observable
  MixedCollection
    Errors

Class Ext.data.Errors

Package:Ext.data
Defined In:Errors.js
Class:Errors
Extends:MixedCollection

Wraps a collection of validation error responses and provides convenient functions for accessing and errors for specific fields.

Usually this class does not need to be instantiated directly - instances are instead created automatically when validate on a model instance:

//validate some existing model instance - in this case it returned 2 failures messages
var errors = myModel.validate();

errors.isValid(); //false

errors.length; //2
errors.getByField('name');  // [{field: 'name',  error: 'must be present'}]
errors.getByField('title'); // [{field: 'title', error: 'is too short'}]

Config Options

Config OptionsDefined By
 allowFunctions : Boolean
Specify true if the addAll function should add function references to the collection. Defaults to false.
MixedCollection

Public Properties

This class has no public properties.

Public Methods

MethodDefined By

Public Events

EventDefined By