docs: function validate(object, schema, options) {
          options = mixin({}, validate.defaults, options);
  
          if (options.trim === true) {
              // ensure that trim works in old browsers
              if (!String.prototype.trim) {
                  String.prototype.trim = function () {
                      return this.replace(/^\s+|\s+$/g, '');
                  };
              }
          }
  
          var errors = [];
  
          // handle array root element
          if (schema.items) {
              validateProperty(object, object, '', schema, options, errors);
          } else {
              validateObject(object, schema, options, errors);
          }
  
          return {
              valid: !(errors.length),
              errors: errors
          };
      }