Liking cljdoc? Tell your friends :D

csv2rdf.metadata.validator


anyclj

(any _context x)

Matches any value successfully

Matches any value successfully
raw docstring

arrayclj


array-ofclj

(array-of element-validator)

boolclj


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.
raw docstring

characterclj


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
raw docstring

eqclj

(eq expected)

expect-typeclj

(expect-type expected-type)

ignore-invalidclj

(ignore-invalid validator)

invalidclj


invalid?clj

(invalid? x)

kvpclj

(kvp key-validator value-validator)

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.
raw docstring

make-errorclj

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

make-warningclj

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

map-ofclj

(map-of key-validator value-validator)

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.
raw docstring

nullableclj

(nullable validator)

Wraps a validator into one which allows explicit null values.

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

numberclj


objectclj


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.
raw docstring

optional-keyclj

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

required-keyclj

(required-key k value-validator)

strictclj

(strict validator)

stringclj


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.
raw 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
raw docstring

type-error-messageclj

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

uriclj


valid?clj

(valid? x)

variantclj

(variant tag-validators)

warn-invalidclj


warn-withclj

(warn-with value)

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.
raw 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.
raw docstring

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

× close