This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-04
Channels
- # announcements (13)
- # beginners (51)
- # boot (3)
- # calva (10)
- # cider (20)
- # clj-kondo (55)
- # cljs-dev (60)
- # clojure (99)
- # clojure-europe (6)
- # clojure-gamedev (9)
- # clojure-italy (19)
- # clojure-nl (7)
- # clojure-spec (20)
- # clojure-uk (42)
- # clojurescript (96)
- # clojurex (37)
- # clojutre (1)
- # cursive (37)
- # data-science (2)
- # datomic (15)
- # defnpodcast (9)
- # duct (7)
- # emacs (6)
- # events (9)
- # fulcro (124)
- # jackdaw (4)
- # jobs (4)
- # leiningen (9)
- # malli (7)
- # mount (3)
- # off-topic (109)
- # other-languages (8)
- # re-frame (39)
- # reagent (4)
- # reitit (6)
- # remote-jobs (2)
- # rewrite-clj (36)
- # ring (4)
- # shadow-cljs (16)
- # spacemacs (16)
- # tools-deps (91)
- # vim (8)
- # yada (2)
@roklenarcic in latest master, you can use IntoSchema
values as element in the schema ast:
(require '[malli.core :as m])
(def sequential (#'m/-collection-schema `sequential sequential? seq nil))
(m/validate [sequential int?] '(1 2 3))
; => true
(m/validate [sequential int?] [1 2 3])
; => true
(m/form [sequential int?])
; => [user/sequential int?]
nice trick to get around private var 🙂
not complete, transforming needs to retain the original type, but an example of all the extensions implemented and tested for a schema: https://github.com/metosin/malli/pull/110