Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用LinValidator报错 #133

Open
keweixun01 opened this issue Oct 13, 2021 · 0 comments
Open

使用LinValidator报错 #133

keweixun01 opened this issue Oct 13, 2021 · 0 comments

Comments

@keweixun01
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant