-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Here is a simple example using spec's int-in
(defphraser :default
[_ problem]
problem)
(defphraser (s/int-in min max)
[_ _ min max]
(str "must be between " min " and " max))
(s/def ::total-widgets (s/int-in 1 32))
(phrase/phrase-first {} ::total-widgets 100)
This hits the default handler, and the problem map has the pred value
:pred ( clojure.core/fn [ % ] ( clojure.spec.alpha/int-in-range? 1 32 % ) )
What's the proper way to phrase this?
Metadata
Metadata
Assignees
Labels
No labels