Documentation
¶
Overview ¶
Credit to https://github.com/santhosh-tekuri/jsonschema vendored from https://github.com/kaptinlin/jsonschema/blob/main/formats.go to keep size smaller
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FormatValidators = map[string]func(any) bool{ "date-time": isDateTime, "date": isDate, "time": isTime, "duration": isDuration, "period": isPeriod, "hostname": isHostname, "email": isEmail, "ip-address": isIPV4, "ipv4": isIPV4, "ipv6": isIPV6, "uri": isURI, "iri": isURI, "uri-reference": isURIReference, "uriref": isURIReference, "iri-reference": isURIReference, "uri-template": isURITemplate, "json-pointer": isJSONPointer, "relative-json-pointer": isRelativeJSONPointer, "uuid": isUUID, "regex": isRegex, "unknown": func(any) bool { return true }, }
Formats is a registry of functions, which know how to validate a specific format.
New Formats can be registered by adding to this map. Key is format name, value is function that knows how to validate that format.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.