Skip to content

Add validators for built-in formats #6

@jacksmith15

Description

@jacksmith15

JSONSchema specifies several preset values for the "format" keyword for validating strings, along with the validation logic they should perform. "uuid" and "date-time" are already implemented, the following are not:

  • "time"
  • "date"
  • "email"
  • "idn-email"
  • "hostname"
  • "idn-hostname"
  • "ipv4"
  • "ipv6"
  • "uri"
  • "uri-reference"
  • "iri"
  • "iri-reference"
  • "uri-template"
  • "json-pointer"
  • "relative-json-pointer"
  • "regex"

The correct validation logic for each is specified here.

Currently only validation for "date-time" and "uuid" is enabled (see here).

The remaining format validators should be implemented here.

An example test for "uuid" can be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions