string isoDate should allow the string to be converted to same format as date iso schema #1196
Labels
breaking changes
Change that can breaking existing code
bug
Bug or defect
feature
New functionality or improvement
Milestone
Context
What are you trying to achieve or the steps to reproduce ?
Due to a limitation with using joi as the schema for DynamoDb via https://github.com/ryanfitz/vogels I need to validate dates with
joi.string().isoDate()
and use the value returned from validation to store in DynamoDb. I need the date to be formatted in the simplified extended ISO format in the same way thatjoi.date().iso()
would return.Which result you had ?
The string schema just returns the provided string. i.e
"2017-01-01"
returns"2017-01-01"
What did you expect ?
I want it to return
"2017-01-01T00:00:00.000Z"
, or an option to convert it as suchThe text was updated successfully, but these errors were encountered: