validate.js 197 字节
Newer Older
1 2 3 4 5 6 7
module.exports = function (value = {}, schema = {}) {
  const validateRes = this.validator.validate(value, schema)
  if (validateRes) {
    delete validateRes.schemaKey
    throw validateRes
  }
}