lib/db/mongodb/schemas/contentType.js
function validateFieldType(fieldsCollection){
        var err;

        // ensure fieldsCollection is an array.
        if(!_.isArray(fieldsCollection)) {
            err = new Error('content type fields collection must be an array of field objects.');
        }

        if(!err) {
            _.each(fieldsCollection, function(field){
                err = isValidField(field);
            });
        }

        return _.isUndefined(err);
    }
function validateFieldType(fieldsCollection){
        var err;

        // ensure fieldsCollection is an array.
        if(!_.isArray(fieldsCollection)) {
            err = new Error('content type fields collection must be an array of field objects.');
        }

        if(!err) {
            _.each(fieldsCollection, function(field){
                err = isValidField(field);
            });
        }

        return _.isUndefined(err);
    }
function validateFieldType ( fieldsCollection ) { var err ; // ensure fieldsCollection is an array. if ( ! _ . isArray ( fieldsCollection ) ) { err = new Error ( 'content type fields collection must be an array of field objects.' ) ; } if ( ! err ) { _ . each ( fieldsCollection , function ( field ) { err = isValidField ( field ) ; } ) ; } return _ . isUndefined ( err ) ; }
In order to be valid we are checking the following rules
1) Collection must be an instance of an array
2) Does the element in the Collection array have all of the necessary properties
3) Are there any duplicate ids

@param value
@returns {null}
In order to be valid we are checking the following rules 1 ) Collection must be an instance of an array 2 ) Does the element in the Collection array have all of the necessary properties 3 ) Are there any duplicate ids