lin-cms-koa icon indicating copy to clipboard operation
lin-cms-koa copied to clipboard

使用LinValidator报错

Open keweixun01 opened this issue 4 years ago • 0 comments

定义: const { Rule, LinValidator } = require('lin-mizar') class test extends LinValidator{ constructor(){ super() this.test =[ new Rule('isInt','测试') ] } } module.exports = {test} 使用: router.get('/:test/error',(ctx,next)=>{ const res = new Test().validate(ctx) console.log(res) }) 报错: E:\work\Node\execrise\koa\node_modules\lin-mizar\lin\exception\http-exception.js:10 throw new Error('CodeMessage.getMessage() must be implemented');

keweixun01 avatar Oct 13 '21 10:10 keweixun01