Liking cljdoc? Tell your friends :D

wagoe.core.validation

Compiled Malli validators, explainers and decoders, cached.

This is all this namespace does. It used to also carry a second copy of the validation-result API — validate-with-transform, validation-passed?, get-validation-errors, success-result, failure-result, error-map — wrapping wagoe.core.validation.result, and a third copy lived in wagoe.core.utils.validation with a different implementation of the same name. Two answers to one question, neither of them called by anything outside their own tests (BOU-323).

Worse, validate-with-transform chose its return shape at runtime from the :devex-validation feature flag: {:valid? true :data …} with the flag off, a structured success-result with it on. A function whose result shape depends on an environment variable cannot be typed, tested or documented — which is what ADR-036 §2 settles, and why the fork is gone rather than ported.

Result shapes live in wagoe.core.validation.result; rule helpers in wagoe.core.validation.registry; error codes in wagoe.core.validation.codes.

Compiled Malli validators, explainers and decoders, cached.

This is all this namespace does. It used to also carry a second copy of the
validation-result API — validate-with-transform, validation-passed?,
get-validation-errors, success-result, failure-result, error-map — wrapping
wagoe.core.validation.result, and a third copy lived in
wagoe.core.utils.validation with a different implementation of the same
name. Two answers to one question, neither of them called by anything
outside their own tests (BOU-323).

Worse, validate-with-transform chose its *return shape* at runtime from the
:devex-validation feature flag: {:valid? true :data …} with the flag off,
a structured success-result with it on. A function whose result shape
depends on an environment variable cannot be typed, tested or documented —
which is what ADR-036 §2 settles, and why the fork is gone rather than
ported.

Result shapes live in wagoe.core.validation.result; rule helpers in
wagoe.core.validation.registry; error codes in wagoe.core.validation.codes.
raw docstring

decoderclj

Cached (m/decoder schema transformer).

Cached (m/decoder schema transformer).
sourceraw docstring

explainclj

(explain schema data)

Explain validation errors using the cached compiled explainer.

Explain validation errors using the cached compiled explainer.
sourceraw docstring

explainerclj

Cached (m/explainer schema).

Cached (m/explainer schema).
sourceraw docstring

valid?clj

(valid? schema data)

Validate data against schema using the cached compiled validator.

Validate data against schema using the cached compiled validator.
sourceraw docstring

validatorclj

Cached (m/validator schema).

Cached (m/validator schema).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close