format

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package format defines format checkers for the format keyword. By default the format keyword is always accepted. If this package is imported, the format keyword will be verified as described by the JSON schema docs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFormatValidator

func RegisterFormatValidator(format string, fv func(any, *schema.ValidationState) error)

RegisterFormatValidator registers a custom format validator. If a schema uses format with the given keyword, this function will be called to validate the schema. The function will be called with an instance value. If the format does not match the instance, the function should return an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL