could someone check the reasoning in https://github.com/metosin/malli/pull/201?
I now understand why schema.core/both
got deprecated. :or
is kinda complex when you wan’t to cover both validation and transformation. Same thing was “fixed” in spec-tools some weeks ago: results of a transformed branch needs to be validated to know if the branch was good.
I faced the same issue in my lib, and tried to separate shape-type elements from the predicates which are checking properties on them.
schema had s/conditional
, maybe Malli should have :conditional
too :thinking_face:
could be implemented using :multi
with just few extra lines to swap the dispatch function & values.