Fork me on GitHub
#malli
<
2022-11-18
>
lepistane09:11:51

Hello I can't seem to figure out how to make humanize and explain give me reason fit for me. So i gotta a schema

[:map
 {:closed true}
 [:client [:fn #function[app.validation/fn--37864]]]
 [:sport [:fn #function[app.validation/fn--37866]]]
 [:stream [:fn #function[app.validation/fn--37868]]]
 [:timestamp [:fn #function[app.validation/fn--37870]]]]
All these are custom functions (more tight than regular predicate) And when i send gibberish to be validated i wanted to have human readable output (in logs)
(me/humanize (m/explain schema data))
But i get
{:sport ["unknown error"], :stream ["unknown error"]}
which i don't find very useful and i would like these to be more useful. is there anyway for these errors to be different? solved
[:fn {:error/message "AAA"}
             (fn [val] ...)))]