Fork me on GitHub
#malli
<
2022-05-25
>
kenny16:05:27

Hi. Instead of an :error/fn returning a string, could I return explain data? If yes, what's the recipe to do so?

Alexis Schad16:05:44

What do you mean by "explain data"? But yes if you returns a non-string value, it works as you expect (I think).

ikitommi15:05:59

Currently no, but in one project needed richer explanations and did an ugly hack to enable that. I think we should support that at library level. E.g. one could return {:message "so wrong", :level "warning"}

ikitommi15:05:14

Could you write an issue of this?