This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-28
Channels
Folks, Can I, based in one value, define what should be the schema for other property? Example:
{:key1 2
:other-key ""}
{:key1 3
:other-key "should not be empty"}
[:map
[:key1 number?]
[:other-key (if (= 2 :key1 )
empty?
other-validation)]]
Maybe :multi
?
[:multi {:dispatch :key1}
[2 [:map [:other-key :string]]]
[3 [:map [:other-key :int]]]]
wondering if anyone has a port of https://github.com/clojure/core.specs.alpha for #malli? Asking for a friend 😇
👀 1