📜  TypeError:应为字符串,但收到未定义的字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:18.351000             🧑  作者: Mango

代码示例1
TypeError: Expected a string but received a undefined    at assertString (D:\Projects\blog-website2\node_modules\validator\lib\util\assertString.js:17:11)    at Object.isEmpty (D:\Projects\blog-website2\node_modules\validator\lib\isEmpty.js:19:29)    at field_validation_function (D:\Projects\blog-website2\src\middlewares\admin\login_form_validation.js:9:22)    at module.exports.field_validation (D:\Projects\blog-website2\src\middlewares\admin\login_form_validation.js:27:8)    at Layer.handle [as handle_request] (D:\Projects\blog-website2\node_modules\express\lib\router\layer.js:95:5)    at next (D:\Projects\blog-website2\node_modules\express\lib\router\route.js:137:13)    at Route.dispatch (D:\Projects\blog-website2\node_modules\express\lib\router\route.js:112:3)    at Layer.handle [as handle_request] (D:\Projects\blog-website2\node_modules\express\lib\router\layer.js:95:5)    at D:\Projects\blog-website2\node_modules\express\lib\router\index.js:281:22    at Function.process_params (D:\Projects\blog-website2\node_modules\express\lib\router\index.js:335:12)