Fork me on GitHub

in a project swapping plumatic into malli and I think there should be more built-in schemas for common thigns, strings and dates. Maybe something like:

[:string {:min 1, :max 10}]
[:int {:min 1, :max 10}]
[:date {:min "2012-04-23"}]
[:date-time {:min "2012-04-23 00:00:00", :format "yyyy-MM-dd HH:mm:ss"}] 


Sounds good to me. Maybe some of those should be aliases for other more in-depth schemas, but it’ll help the users a lot if there’s a good collection of those available out of the box.


…huh, even? and odd? are not in the predicate registry. I was about to mention how to something like [:range {:from 0 :to 10 :step 2}] would really be just [:and [:int {:min 0 :max 10}] [:even?]] and thought to check that. Sorry, my mind’s wandering 🙂


Also pos? neg? seem to be missing. Are these left out on purpose or just forgotten?


the initial set of predicates for taken from clojure.spec, those which have generators defined. no other reason, could be added.


Righto 🙂