Functional validations.
Functional validations.
(merge-errors & error-maps)
Merge error maps returned by from the validation-on function.
Merge error maps returned by from the validation-on function.
(validate value-map & validations)
Validate a map of values using the supplied validations. Each validation is represented as a vector containing [key predicate? error] values. A map is returned for all the keys that failed their predicates, in the form: {key [errors]}. If no predicates return false, nil is returned.
Validate a map of values using the supplied validations. Each validation is represented as a vector containing [key predicate? error] values. A map is returned for all the keys that failed their predicates, in the form: {key [errors]}. If no predicates return false, nil is returned.
(validation-on key pred? error)
Performs a validation on a key in a map using the supplied predicate function. A {key [error]} map is returned if the predicate returns false; nil is returned if the predicate returns true.
Performs a validation on a key in a map using the supplied predicate function. A {key [error]} map is returned if the predicate returns false; nil is returned if the predicate returns true.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close