shim/browser/aschema.js
function validate(values) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    var s = this;

    var _tv4$validateMultiple = tv4.validateMultiple(values, s),
        valid = _tv4$validateMultiple.valid,
        errors = _tv4$validateMultiple.errors;

    if (valid) {
      return null;
    }

    var assign = options.assign,
        _options$name = options.name,
        name = _options$name === void 0 ? 'SchemaError' : _options$name;
    var _s$schema = s.schema,
        schema = _s$schema === void 0 ? {} : _s$schema;
    var error = new Error("Validation failed with schema: ".concat(schema.title || schema.id || schema.description));
    return Object.assign(error, {
      id: uuid.v4(),
      name: name,
      errors: errors,
      schema: schema,
      values: values,
      engine: 'tv4'
    }, assign);
  }
function validate(values) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    var s = this;

    var _tv4$validateMultiple = tv4.validateMultiple(values, s),
        valid = _tv4$validateMultiple.valid,
        errors = _tv4$validateMultiple.errors;

    if (valid) {
      return null;
    }

    var assign = options.assign,
        _options$name = options.name,
        name = _options$name === void 0 ? 'SchemaError' : _options$name;
    var _s$schema = s.schema,
        schema = _s$schema === void 0 ? {} : _s$schema;
    var error = new Error("Validation failed with schema: ".concat(schema.title || schema.id || schema.description));
    return Object.assign(error, {
      id: uuid.v4(),
      name: name,
      errors: errors,
      schema: schema,
      values: values,
      engine: 'tv4'
    }, assign);
  }
function validate ( values ) { var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ; var s = this ; var _tv4$validateMultiple = tv4 . validateMultiple ( values , s ) , valid = _tv4$validateMultiple . valid , errors = _tv4$validateMultiple . errors ; if ( valid ) { return null ; } var assign = options . assign , _options$name = options . name , name = _options$name === void 0 ? 'SchemaError' : _options$name ; var _s$schema = s . schema , schema = _s$schema === void 0 ? { } : _s$schema ; var error = new Error ( "Validation failed with schema: " . concat ( schema . title || schema . id || schema . description ) ) ; return Object . assign ( error , { id : uuid . v4 ( ) , name : name , errors : errors , schema : schema , values : values , engine : 'tv4' } , assign ) ; }
Validate values.
@param {object} values - Values to validate.
@param {object} [options] - Optional settings.
@returns {object|null} - Null if success.
Validate values .