-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
I've been using the new .raw() method as follows:
Joi.date().options({ convert: true }).raw().iso()which works correctly and the validator throws the following error on invalid input:
value must be a valid ISO 8601 date
but strangely:
Joi.date().iso().options({ convert: true }).raw()throws the following error on invalid input:
value must be a number of milliseconds or valid date string
It seems that .options() and/or .raw() is causing the underlying flags._format to be lost.
Is this the desired behavior?
Thanks in advance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect