Reputation: 11
ValidationChain Express-validator not working when use obj config
Anyone can help me for this problem. I have two this property. "Status" not working when my req.body.status="", but type still work truthly. [enter image description here]. Here is config of two this (https://i.sstatic.net/1KYwNpv3.png). I use "express-validator" module npm nodejs
But still not working Server response Server still return empty Status and not check another validate Here is my routes
Upvotes: 0
Views: 32
Reputation: 392
You need to add the notEmpty
method to the schema definition to disallow empty strings
Upvotes: 0