This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-22
Channels
- # announcements (2)
- # babashka (18)
- # beginners (87)
- # calva (22)
- # chlorine-clover (5)
- # cider (11)
- # clj-kondo (10)
- # clojure (71)
- # clojure-austin (1)
- # clojure-norway (6)
- # clojure-uk (13)
- # clojurescript (3)
- # core-async (10)
- # data-science (17)
- # datascript (1)
- # datomic (22)
- # emacs (10)
- # fulcro (32)
- # hoplon (8)
- # jobs-discuss (2)
- # malli (5)
- # meander (5)
- # nrepl (35)
- # off-topic (8)
- # pathom (38)
- # planck (21)
- # re-frame (10)
- # reagent (17)
- # reitit (7)
- # shadow-cljs (26)
- # tools-deps (3)
- # xtdb (7)
@ikitommi What is the reason Malli use [:map [:x int?] [:y int?]]
instead of [:map :x int? :y int?]
?
(I am asking for :map
because I am wondering the same for :cat
and :alt
)
I guess that inside [:x int?] you can set many things: customized error message, validation function etc. Without vector[:x int?] expression structure becomes unreadable.
👍 4
Good point.
I updated the tests for :cat
and :alt
. Those tests represent the proposal I make for the data format which constitutes the API for this part of Malli.
Feedback welcome ! https://github.com/metosin/malli/pull/187/files