(wrap-single-model-validate f)
validates input according to model
(pipeline/normalise {:account/name "Chris"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name number?}}}} wrappers) => (throws-info {:not-validated true :nsv [:account :name]})
(pipeline/normalise {:account/name "Bob"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name #(= % "Bob")}}}} wrappers) => {:account {:name "Bob"}}
validates input according to model (pipeline/normalise {:account/name "Chris"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name number?}}}} *wrappers*) => (throws-info {:not-validated true :nsv [:account :name]}) (pipeline/normalise {:account/name "Bob"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:validate {:account {:name #(= % "Bob")}}}} *wrappers*) => {:account {:name "Bob"}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close