validate.js 197 字节
Newer Older
study夏羽's avatar
study夏羽 已提交
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
  }
}