Open SeyTo opened 4 years ago
Reproduction: Using a basic express prototype:
router.post( '/', bodymen.middleware({ fieldA: { type: String, required: true }, fieldB: { type: String, required: "randomstring" }, fieldC: { type: String, required: () => { return false } } }), (req, res, next) => { res.end("done") } )
All the 3 fields fieldA .. C becomes a required = true case. Calling it will return that all fields are required. I was hoping that atleast 'fieldC' should work as expected. Did I miss anything?
fieldA .. C
Reproduction: Using a basic express prototype:
All the 3 fields
fieldA .. C
becomes a required = true case. Calling it will return that all fields are required. I was hoping that atleast 'fieldC' should work as expected. Did I miss anything?