This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-12
Channels
- # announcements (9)
- # babashka (2)
- # beginners (27)
- # clojure (19)
- # clojure-bay-area (1)
- # clojure-germany (7)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojurescript (6)
- # conjure (1)
- # datomic (10)
- # fulcro (11)
- # graalvm (1)
- # introduce-yourself (3)
- # jobs (1)
- # luminus (1)
- # malli (9)
- # off-topic (23)
- # podcasts-discuss (3)
- # polylith (6)
- # practicalli (1)
- # re-frame (14)
- # sci (2)
- # shadow-cljs (5)
is there a trick to debugging this m/explain
exception? Vector's key for assoc must be a number.
at https://github.com/metosin/malli/blob/master/src/malli/error.cljc#L139
humaize should not throw, ever. There is an open issue/PR, seems stalled: https://github.com/metosin/malli/pull/333#discussion_r588855299
i'll put together a repro and submit an issue. my problem seems different to the one that you have linked
turns out i was overwriting instead of adding to the default error message set
I feel like I may have asked this question before, but am having trouble finding the right keywords to search in the slack archive, so apologies for the redundant question: Does malli
provide a meta-schema or helper function I can use to programatically validate forms that may or may not be valid malli
schemas? Is there a self-describing malli schema for malli schemas?
Something like:
(m/validate malli-meta-schema [:a])
=> false
(m/validate malli-meta-schema [:or [:fn int?] [:fn string?]])
=> true
@afoltzm not yet. But since 0.5.0, each IntoSchema
can describe it's properties and children schemas. Once all built-in schemas have described themselves (currently empty impls), one can ask from a registry the accumulated schema for schema AST.
@ikitommi gotcha, thanks! right now I'm just doing a basic helper predicate that relies on the catching the exception thrown by calling m/schema
on the form, which I think suffices for my current use case.