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.
Click to show internal directories.
Click to hide internal directories.