Skip to content

使用LinValidator报错 #133

@keweixun01

Description

@keweixun01

定义:
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');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions