Date
or a String
.schema
property to perform static validation. The value of the schema
property is a schema definition from express-validator. You can also use the validate()
method, which is used to perform dynamic and asynchronous validation.super-rentals
example, we only need to validate the id parameter for getOne()
, update()
, and delete()
. The schema for each method will be the same so we are only going to show the schema for the getOne()
method.