validate.js 204 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
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
  }
}