This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-26
Channels
- # aatree (6)
- # admin-announcements (2)
- # aws (1)
- # beginners (46)
- # boot (341)
- # braid-chat (3)
- # cider (20)
- # clara (1)
- # cljs-dev (3)
- # cljsjs (7)
- # cljsrn (73)
- # clojure (63)
- # clojure-art (4)
- # clojure-dev (3)
- # clojure-russia (83)
- # clojurescript (77)
- # core-async (12)
- # core-matrix (2)
- # cursive (9)
- # data-science (1)
- # datomic (14)
- # dirac (3)
- # emacs (9)
- # hoplon (3)
- # immutant (8)
- # ldnclj (80)
- # luminus (13)
- # mount (7)
- # off-topic (4)
- # om (288)
- # onyx (20)
- # overtone (5)
- # pedestal (10)
- # perun (3)
- # proton (103)
- # quil (1)
- # re-frame (3)
- # reagent (13)
- # ring-swagger (7)
- # yada (43)
I'm using compojure-api and trying to validate a query param as a number in a range. The number part is fine, but how about the range? So far I have {pageSize :- (ring-schema/describe Integer "number of results to return") 20}
With s/constrained
you can combine a Schema with a function: (s/constrained Integer (fn [x] (<= 1 x 9000)))
Compared to just using s/pred
this enables coercion per Integer Schema