code: function validateFields(contentType, cb) {
          if (_.isArray(contentType.fields)) {
              async.each(contentType.fields, validateField, function(err) {
                  cb(err);
              });
          } else {
              cb();
          }
      }
docs: Function will iterate all the fields in the content type and check the validation rules for each one.