practica icon indicating copy to clipboard operation
practica copied to clipboard

Lacking type coercion during validation

Open goldbergyoni opened this issue 2 years ago • 1 comments

When validating input, it's also the right place to coerce value to their right domain type

For example, when getting req.body.userId - it's string by default, inside our domain it should be a number

Ajv supports this: https://ajv.js.org/coercion.html

goldbergyoni avatar Oct 03 '22 11:10 goldbergyoni

Hi, I would like to contribute to this amazing repo, is this issue still relevant?

Taimoorkhan1122 avatar Jul 15 '23 16:07 Taimoorkhan1122