Cannot read property 'validate' of undefined
See original GitHub issue* getInfo(ctx) {
const request = ctx.request.body;
const email = request.email;
const url = request.filename;
// const createRule = {
// email: {
// type: 'email',
// }
// };
// ctx.validate(createRule);
const errors = ctx.validator.validate({ email: : 'email' }, request);
ctx.body = errors || 'ok'
}
开启验证插件除了在plugin加进来,还要配置什么吗?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'validate' of undefined
I am trying to validate my registration form but I'm getting this error and I can't solve it. my form submit button goes...
Read more >TypeError: Cannot read property 'validate' of undefined? - React
“Cannot read property 'validate' of undefined”? Anyone can help in finding the error. ... Is there any more to that error? For example...
Read more >TypeError: Cannot read property 'validate' of undefined #2291
I am getting the error TypeError: Cannot read property 'validate' of undefined when running a chai-enzyme test, followed by the warning: ...
Read more >Cannot read property 'validate' of undefined - Quasar forum
I assumed that it cannot read 'validate' property after all the field was correctly filled. Update : I counter the issue by using...
Read more >Uncaught TypeError: Cannot read property 'messages' of ...
The error happens when the library `cv.jquery.validate` is added by BigPipe and compressed. I just disabled the library compressing in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
或者你应该
@atian25 尴尬。。解决了