Many thanks John.

I'll check out phrase. If you do get something working I'd love to see it 
as your approach seems the simplest to me.

cheers

Dave

On Monday, February 3, 2020 at 10:27:08 PM UTC, John Shaffer wrote:
>
> The phrase library can create human-readable error messages:
> https://github.com/alexanderkiel/phrase
>
> 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.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/87755d5c-b66c-4045-817a-a1fac549f23c%40googlegroups.com.

Reply via email to