You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
he schema defines the timePeriod type as a string with a format of time, which is expected to be in the format HH:MM:SS.
The error message returned is: "Expected string to match 'time' format".
The issue occurs consistently when providing values for startTime in the format HH:MM:SS.
When providing a value for the startTime property in the query, it should be validated against the expected format of HH:MM:SS (24-hour time format). If the value matches this format, the validation should pass, and the query should be processed successfully.
What do you see instead?
{
"type": "validation",
"on": "query",
"summary": "Property 'startTime' should be time",
"property": "/startTime",
"message": "Expected string to match 'time' format",
"expected": {},
"found": {
"startTime": "10:30:00",
"limit": 50,
"offset": 0,
},
"errors": [
{
"type": 50,
"schema": {
"format": "time",
"description": "Time in HH:MM:SS format",
"examples": [
"08:00:00",
"12:00:00"
],
"type": "string"
},
"path": "/startTime",
"value": "10:30:00",
"message": "Expected string to match 'time' format",
"summary": "Property 'startTime' should be time"
}
]
}
Additional information
No response
Have you try removing the node_modules and bun.lockb and try again yet?
no
The text was updated successfully, but these errors were encountered:
It looks to me like the code copies the logic from typebox, which takes the requirement from AJV that the time value must have a timezone. Obviously that doesn't align with ISO8601 though... I thought it would be fun to fix it but since that is done on purpose I dunno what the authors would like to do about that as fixing it involves dealing with the strictTimeZone argument as whilst true included for the time value the !tz check will fail.
I also wasn't convinced the regex was correct per the spec if this is supposed to match JSON schema since the regex does allow some exclusion of timezone minutes.
What version of Elysia is running?
"elysia": "^1.1.23"
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
he schema defines the timePeriod type as a string with a format of time, which is expected to be in the format HH:MM:SS.
The error message returned is: "Expected string to match 'time' format".
The issue occurs consistently when providing values for startTime in the format HH:MM:SS.
What is the expected behavior?
When providing a value for the startTime property in the query, it should be validated against the expected format of HH:MM:SS (24-hour time format). If the value matches this format, the validation should pass, and the query should be processed successfully.
What do you see instead?
Additional information
No response
Have you try removing the
node_modules
andbun.lockb
and try again yet?no
The text was updated successfully, but these errors were encountered: