Changes for version v0.8.0 - 2026-03-01

  • Dependencies
    • Removed DateTime::Duration as a dependency. DateTime::Duration->new() accepted any numeric values without complaint and therefore provided no validation beyond what the regex already enforced; it has been dropped entirely.
    • register_builtin_formats() now probes for Time::Piece (core since perl 5.10) before falling back to DateTime for the 'date-time' and 'date' format validators. Priority order is now: DateTime::Format::ISO8601 > Time::Piece > DateTime > regex.
  • Format Validation
    • Tightened the 'duration' format validator (RFC 3339 / ISO 8601):
      • Week form (PnW) is now handled separately and correctly; mixing week designators with other date/time designators is rejected per ISO 8601.
      • A bare 'P' or 'PT' with no components is now correctly rejected.
      • The 'T' separator is rejected when not followed by at least one time designator (lookahead guard added).
    • The 'duration' validator is now self-contained (pure regex); no module is required or attempted.

Documentation

JSON Schema Exception

Modules

Lean, recursion-safe JSON Schema validator (Draft 2020-12)

Provides

in lib/JSON/Schema/Validate.pm