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
Tuấn Hiệp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You need to add the notEmpty
method to the schema definition to disallow empty strings