Liking cljdoc? Tell your friends :D

mongofinil.validation-helpers


allow-keysclj

(allow-keys allowed-keys & [msg])

Validates that the map MAY contain keys listed, and no keys not listed

Validates that the map MAY contain keys listed, and no keys not listed
sourceraw docstring

col-predicatecljmacro

(col-predicate col f & [msg])

Require that f, a predicate, returns truthy when passed (get obj col)

Require that f, a predicate, returns truthy when passed (get obj col)
sourceraw docstring

is-map?clj

(is-map? & [msg])
source

is-ref?clj

(is-ref? & [msg])
source

key-typeclj

(key-type k cls)

Validates that the column is of the specified class

Validates that the column is of the specified class
sourceraw docstring

key-typesclj

(key-types ks)

Takes a map of keys to classes. Validates that each key in map is of the specified class.

Takes a map of keys to classes. Validates that each key in map is of the specified class.
sourceraw docstring

map-predicateclj

(map-predicate f s)

Calls a validation fn on each item in coll, returning the first call to return an error string

Calls a validation fn on each item in coll, returning the first
call to return an error string
sourceraw docstring

maybeclj

(maybe f)

HOF, takes a predicate, and returns a fn that is true if argument passed in is nil, or passes the predicate.

((maybe integer?) 3) => true ((maybe integer?) nil) => true ((maybe integer?) :bogus) => false

HOF, takes a predicate, and returns a fn that is true if argument passed in is nil, or passes the predicate.

((maybe integer?) 3) => true
((maybe integer?) nil) => true
((maybe integer?) :bogus) => false
sourceraw docstring

require-keyclj

(require-key k)
source

require-key*clj

(require-key* o k)
source

require-keysclj

(require-keys keys)

Validates that the map contains all of the keys

Validates that the map contains all of the keys
sourceraw docstring

require-predicatecljmacro

(require-predicate f & msg)
source

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

× close