我是nodeJs的新手,我试图检查用户的电子邮件是否已经存在于数据库中,但似乎我做错了什么,它总是告诉我“电子邮件已经存在”我尝试了几种不同的方法,但都不起作用。我希望这里有人能帮我解决这个问题。谢谢。var name = req.body.name;req.checkBody('name', 'Name is required').notEmpty();
req.checkBody('
如何访问由.withMessage()方法生成的快速验证器中的消息?我的目标是使用res.render呈现错误消息,其中{messages =?}。函数本身运行良好。const userValidationRules = () => {
body('username').isLength({ min: 5 }).withMessage('username must be at least 5 chars long'), //{"erro
我正在尝试安装npm模块express-validator。它给出了其中一个依赖项的以下错误。有没有人知道如何修复它。npm ERR!404 It was specified as a dependency of 'express-validator'npm ERR!command "/usr/bin/node" "/usr/bin/npm" "inst