-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Description
Validation of date-time format accepts the value 2022-02-03T11:47:43.123 as valid, even though a time zone offset or Z is required.
From the JSON schema spec, section 7.3.1:
Date and time format names are derived from RFC 3339, section 5.6.
...
date-time:
A string instance is valid against this attribute if it is a valid representation according to the "date-time" production.
And looking at RFC 3339, section 5.6:
full-time = partial-time time-offset
date-time = full-date "T" full-time
The time-offset part is not optional.
To make it backwards compatible, perhaps the lenient validation could be available as an option, though in that case I think the stricter version should be the default behavior.
ethlo