Liking cljdoc? Tell your friends :D

csv2rdf.metadata.validator


anyclj

(any _context x)

Matches any value successfully

Matches any value successfully
sourceraw docstring

arrayclj

source

array-ofclj

(array-of element-validator)
source

boolclj

source

chainclj

(chain & validators)

Composes a sequence of validators into a validator which applies each validator in turn. The resulting validator returns invalid on any intermediate invalid result and does not call any subsequent validators in the chain.

Composes a sequence of validators into a validator which applies each validator in turn.
The resulting validator returns invalid on any intermediate invalid result and does not
call any subsequent validators in the chain.
sourceraw docstring

characterclj

source

default-if-invalidclj

(default-if-invalid validator default)

Returns a validator which returns the given default if the inner validator returns invalid

Returns a validator which returns the given default if the inner validator returns invalid
sourceraw docstring

eqclj

(eq expected)
source

expect-typeclj

(expect-type expected-type)
source

ignore-invalidclj

(ignore-invalid validator)
source

invalidclj

source

invalid?clj

(invalid? x)
source

kvpclj

(kvp key-validator value-validator)
source

kvpsclj

(kvps kvp-specs)

Takes a collection of kvp specs which validate a map and return a key-value pair (or invalid). Combines results for all kvps into a map.

Takes a collection of kvp specs which validate a map and return a key-value pair (or invalid).
Combines results for all kvps into a map.
sourceraw docstring

make-errorclj

(make-error {:keys [path] :as context} msg)
source

make-warningclj

(make-warning {:keys [path] :as context} msg value)
source

map-ofclj

(map-of key-validator value-validator)
source

mappingclj

(mapping m)

Returns a validator which expects its input to be one of the keys in the map m. Returns the value associated with the matching key in m if found, otherwise invalid.

Returns a validator which expects its input to be one of the keys in the map m. Returns the
value associated with the matching key in m if found, otherwise invalid.
sourceraw docstring

nullableclj

(nullable validator)

Wraps a validator into one which allows explicit null values.

Wraps a validator into one which allows explicit null values.
sourceraw docstring

numberclj

source

objectclj

source

one-ofclj

(one-of values)

Returns a validator which expects its input to be one of the given values. Returns the matching value if found, otherwise invalid.

Returns a validator which expects its input to be one of the given values. Returns
the matching value if found, otherwise invalid.
sourceraw docstring

optional-keyclj

(optional-key k value-validator)
(optional-key k value-validator default)
source

required-keyclj

(required-key k value-validator)
source

strictclj

(strict validator)
source

stringclj

source

try-parse-withclj

(try-parse-with f)

Returns a validator which tries to parse the incoming value with the function f. Returns invalid if f throws an exception.

Returns a validator which tries to parse the incoming value with the function f. Returns invalid if f
throws an exception.
sourceraw docstring

type-eqclj

(type-eq expected)

Validator that an object's @type property is the expected value

Validator that an object's @type property is the expected value
sourceraw docstring

type-error-messageclj

(type-error-message permitted-types actual-type)
source

uriclj

source

valid?clj

(valid? x)
source

variantclj

(variant tag-validators)
source

warn-invalidclj

source

warn-withclj

(warn-with value)
source

whereclj

(where pred desc)

Returns a validator which applies the predicate pred to the input value. Returns the value if pred returns true, otherwise invalid. Desc should be a string describing pred.

Returns a validator which applies the predicate pred to the input value. Returns the value if
pred returns true, otherwise invalid. Desc should be a string describing pred.
sourceraw docstring

with-error-handlerclj

(with-error-handler validator error-fn)

Returns a validator which invokes the inner validator with the given error function.

Returns a validator which invokes the inner validator with the given error function.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close