This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-14
Channels
- # aleph (3)
- # announcements (16)
- # aws (6)
- # babashka (10)
- # beginners (28)
- # cider (1)
- # clj-kondo (14)
- # cljdoc (2)
- # cljs-dev (27)
- # cljsrn (7)
- # clojure (78)
- # clojure-europe (2)
- # clojurescript (14)
- # conjure (6)
- # core-async (2)
- # fulcro (5)
- # helix (7)
- # jobs (1)
- # lgbtq (1)
- # malli (12)
- # missionary (1)
- # nbb (10)
- # pathom (1)
- # portal (12)
- # protojure (1)
- # re-frame (41)
- # react (2)
- # reitit (1)
- # reveal (1)
- # shadow-cljs (72)
- # sql (11)
- # tools-deps (8)
- # vim (1)
- # xtdb (4)
Hi, :uuid
schema does not produce correct humanized error:
(me/humanize (m/explain :uuid "foo"))
=> ["unknown error"]
uuid?
produces this:
(me/humanize (m/explain uuid? "foo"))
=> ["should be a uuid"]
uuid?
has an entry in malli.error
but :uuid
does not, so it looks like an easy fix.
Should I log a issue and raise a pull request?Done: https://github.com/metosin/malli/pull/512 Thanks for Malli!
Hi! It’s no option to assoc key with parameters (optional etc.) to schema hm for now, i’m right? I’m forced to use merge for that
@shishkov61 You can use a vector to assoc full entry, not at computer, but this should work:
(mu/assoc :map [:x {:optional true}] :int)
(m/validate
[:map [[:set string?] number?]]
{#{"a"} 1})
=> false
should it be like this?no, guess i'd found it, but it works another way https://github.com/metosin/malli#qualified-keys-in-a-map