Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: '00' is erroneously matched for months and days in date and date-time validation regexes #1043

Closed
RulerOfTheQueendom opened this issue Dec 11, 2024 · 0 comments · Fixed by #1042

Comments

@RulerOfTheQueendom
Copy link
Contributor

The regexes for both FormatOfStringDate and FormatOfStringDateTime in schema_formats.go allow 00 as a valid value for both months and days. This is explicitly specified by section 5.6 the RFC3339 standard as an out-of-range value.

Both regexes should be updated to disallow 00 as a valid value for months and days. Docs should be appropriately updated, and tests should be written as a stopgap measure against regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant