Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
latest
Plugin version
No response
Node.js version
20
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Arch
Description
Throws on stringifying Date
for schema with {type: 'string',format: 'date-time'}
Steps to Reproduce
require('./index.js')({
title: 'dates tuple',
type: 'object',
properties: {
dates: {
type: 'array',
minItems: 2,
maxItems: 2,
items: [
{
type: 'string',
format: 'date-time'
},
{
type: 'string',
format: 'date-time'
}
]
}
}
})({
dates: [new Date(1), new Date(2)]
}) // Error: Item at 0 does not match schema definition.
Expected Behavior
Does not throw on stringifying Date
for schema with {type: 'string',format: 'date-time'}
Metadata
Metadata
Assignees
Labels
No labels