function(errors) {
        var me = this,
            e, eLen, error, value,
            key;

        function mark(fieldId, msg) {
            var field = me.findField(fieldId);
            if (field) {
                field.markInvalid(msg);
            }
        }

        if (Ext.isArray(errors)) {
            eLen = errors.length;

            for (e = 0; e < eLen; e++) {
                error = errors[e];
                mark(error.id, error.msg);
            }
        } else if (errors instanceof Ext.data.Errors) {
            eLen  = errors.items.length;
            for (e = 0; e < eLen; e++) {
                error = errors.items[e];

                mark(error.field, error.message);
            }
        } else {
            for (key in errors) {
                if (errors.hasOwnProperty(key)) {
                    value = errors[key];
                    mark(key, value, errors);
                }
            }
        }
        return this;
    }
function(errors) {
        var me = this,
            e, eLen, error, value,
            key;

        function mark(fieldId, msg) {
            var field = me.findField(fieldId);
            if (field) {
                field.markInvalid(msg);
            }
        }

        if (Ext.isArray(errors)) {
            eLen = errors.length;

            for (e = 0; e < eLen; e++) {
                error = errors[e];
                mark(error.id, error.msg);
            }
        } else if (errors instanceof Ext.data.Errors) {
            eLen  = errors.items.length;
            for (e = 0; e < eLen; e++) {
                error = errors.items[e];

                mark(error.field, error.message);
            }
        } else {
            for (key in errors) {
                if (errors.hasOwnProperty(key)) {
                    value = errors[key];
                    mark(key, value, errors);
                }
            }
        }
        return this;
    }
function ( errors ) { var me = this , e , eLen , error , value , key ; function mark ( fieldId , msg ) { var field = me . findField ( fieldId ) ; if ( field ) { field . markInvalid ( msg ) ; } } if ( Ext . isArray ( errors ) ) { eLen = errors . length ; for ( e = 0 ; e < eLen ; e ++ ) { error = errors [ e ] ; mark ( error . id , error . msg ) ; } } else if ( errors instanceof Ext . data . Errors ) { eLen = errors . items . length ; for ( e = 0 ; e < eLen ; e ++ ) { error = errors . items [ e ] ; mark ( error . field , error . message ) ; } } else { for ( key in errors ) { if ( errors . hasOwnProperty ( key ) ) { value = errors [ key ] ; mark ( key , value , errors ) ; } } } return this ; }
Mark fields in this form invalid in bulk.
@param {Object/Object[]/Ext.data.Errors} errors
Either an array in the form `[{id:'fieldId', msg:'The message'}, ...]`,
an object hash of `{id: msg, id2: msg2}`, or a {@link Ext.data.Errors} object.
@return {Ext.form.Basic} this
Mark fields in this form invalid in bulk .