std.lib.transform.validate
wrap-single-model-validate
added in 3.0
(wrap-single-model-validate f)validates input according to model
(graph/normalise {:account/name “Chris”} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name (fn x _(number? x))}}}} wrappers) => (throws-info {:id :not-validated :nsv :account :name})
(graph/normalise {:account/name “Bob”} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name (fn x _(= x “Bob”))}}}} wrappers) => {:account {:name “Bob”}}