What every format the 2020-12 specification names actually asserts.
format is an ANNOTATION by default and this namespace is only consulted
when a schema asks for the assertion - by declaring the format-assertion
vocabulary, or because the caller compiled with :format-assertion true.
An unknown format is not an error: it annotates and asserts nothing, which
is why known? is a question worth asking before valid? answers one.
Every check is the grammar of the specification that owns it, written out
rather than delegated: java.net.URI is RFC 2396 and accepts what RFC 3986
refuses, InetAddress resolves names, and DateTimeFormatter has no
opinion about a leap second, which RFC 3339 permits at exactly one instant
of the day.
What every `format` the 2020-12 specification names actually asserts. `format` is an ANNOTATION by default and this namespace is only consulted when a schema asks for the assertion - by declaring the format-assertion vocabulary, or because the caller compiled with `:format-assertion true`. An unknown format is not an error: it annotates and asserts nothing, which is why `known?` is a question worth asking before `valid?` answers one. Every check is the grammar of the specification that owns it, written out rather than delegated: `java.net.URI` is RFC 2396 and accepts what RFC 3986 refuses, `InetAddress` resolves names, and `DateTimeFormatter` has no opinion about a leap second, which RFC 3339 permits at exactly one instant of the day.
(known? format)Whether format is one this library asserts. An unknown format is a plain
annotation, which the specification requires and callers rely on.
Whether `format` is one this library asserts. An unknown format is a plain annotation, which the specification requires and callers rely on.
(valid? format s)Whether s satisfies format. An unknown format is satisfied by every
string, and so is every instance that is not a string at all.
Whether `s` satisfies `format`. An unknown format is satisfied by every string, and so is every instance that is not a string at all.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |