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.Cached (m/decoder schema transformer).
Cached (m/decoder schema transformer).
(explain schema data)Explain validation errors using the cached compiled explainer.
Explain validation errors using the cached compiled explainer.
(valid? schema data)Validate data against schema using the cached compiled validator.
Validate data against schema using the cached compiled validator.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |