The phrase library can create human-readable error messages:
I've
been working on something for a more natural (to me) approach, with the
ability to define error messages in-line with the predicate. E.g.,
(s/defop max-length [n]
(sf/validator
#(>= n (count %))
(str "Must be " n " characters or less.")))
I
got this working with spec-alpha2, but my plan was to write some
reforms helpers, and I don't think there is any alpha2 support in
ClojureScript. It seems a lot harder to write specs for the shipping
version of spec, but I'll probably give it a shot this weekend.