This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-13
Channels
- # babashka (1)
- # beginners (11)
- # cider (8)
- # clj-kondo (7)
- # clojure (35)
- # clojure-italy (2)
- # clojurescript (6)
- # conjure (5)
- # datomic (10)
- # duct (7)
- # fulcro (9)
- # helix (2)
- # introduce-yourself (5)
- # lsp (3)
- # malli (7)
- # meander (3)
- # off-topic (8)
- # pathom (3)
- # podcasts-discuss (2)
- # portal (9)
- # reitit (7)
- # releases (3)
- # shadow-cljs (43)
- # sql (25)
- # tools-deps (3)
is there a way to do this :enum {:error/fn entity.validation/malli-humanize-enum-error}
for all enums in the spec, perhaps when calling m/humanize
?
otherwise i could walk the spec and inject them
@robert-stuttaford humanize
takes an :errors
option, where you can override :enum
handling. Walking is another way to do it. There might be others too
thanks @ikitommi - can you point me to example of the :errors
option specifically overriding the printing of errors for a specific spec type like :enum
that i can work from, please?
sure @robert-stuttaford, https://github.com/metosin/malli/blob/master/test/malli/error_test.cljc#L177-L188
ah so:
(assoc-in me/default-errors [:enum :error/fn :en] my-fn-here)