Open pke opened 5 years ago
Using
validate: { type: "form", body: { start: Joi.date().iso().greater("now"), } }
The form input of start="2018-10-10T10:00" or start="2018-10-10T10:00Z" both lead to
start="2018-10-10T10:00"
start="2018-10-10T10:00Z"
child "start" fails because ["start" must be a valid ISO 8601 date]
However Joi.validate("2018-10-10T10:00", Joi.date().iso().greater("now")) => error === null
Joi.validate("2018-10-10T10:00", Joi.date().iso().greater("now"))
Using
The form input of
start="2018-10-10T10:00"
orstart="2018-10-10T10:00Z"
both lead toHowever
Joi.validate("2018-10-10T10:00", Joi.date().iso().greater("now"))
=> error === null