Fork me on GitHub
#malli
<
2020-05-25
>
ikitommi08:05:11

could someone check the reasoning in https://github.com/metosin/malli/pull/201?

ikitommi08:05:05

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.

Vincent Cantin11:05:38

I faced the same issue in my lib, and tried to separate shape-type elements from the predicates which are checking properties on them.

ikitommi08:05:56

schema had s/conditional, maybe Malli should have :conditional too :thinking_face:

4
ikitommi08:05:14

could be implemented using :multi with just few extra lines to swap the dispatch function & values.