TypeError: req.checkBody is not a function

前端 未结 4 1785
花落未央
花落未央 2020-12-18 23:50

I\'m trying to implement some validation in a sign up system, but I get the error:

     TypeError: req.checkBody is not a function

from th

4条回答
  •  遥遥无期
    2020-12-19 00:15

    Same as in the above answer, after installing express-validator, adding

    server.use(expressValidator()); 
    

    under

    const express=require("express"); 
    

    and

    const server=express(); 
    

    solved my problem.

提交回复
热议问题