Skip to content

DateType pattern isn’t anchored #283

Open

Description

@matty0ung

JSON Schema pattern matches anywhere in the string, so "junk2026-11-09junk" validates, and so does "2026-13-45". The fix is ^…$. Time-zone offsets (+01:00, Z) currently pass only because of the missing anchor, so the anchored pattern should allow them deliberately, along with fractional seconds. Or it could just use format: date/date-time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions