You can specify any predicate that you want in your schemas:
(def my-schema (s/both (s/pred (complement empty) 'not-empty) {(s/optional-key :foo) Bool (s/optional-key :baz) Bool (s/optional-key :bar) Bool}))
If you ask how to check a map using only the built-in predicates, you can write:
(def my-schema (s/both {(s/optional-key :foo) Bool (s/optional-key :baz) Bool (s/optional-key :bar) Bool} (s/either {:foo Bool s/Any s/Any} {:baz Bool s/Any s/Any} {:bar Bool s/Any s/Any})))
which is pretty ugly and much more verbose than the pred example
source share