Currently, you would have to define your own schema type to control the
error messages:
https://github.com/plumatic/schema/wiki/Defining-New-Schema-Types-1.0
If you want to submit an issue, we can look into ways to make this simpler.
Thanks!
On Saturday, January 16, 2016 at 11:52:20 PM UTC, J
Do you know if there's a way to identify the particular key that failed in
the error message?
On Saturday, 16 January 2016 02:01:49 UTC-8, JvJ wrote:
>
> That is exactly what I am looking for!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
That is exactly what I am looking for!
--
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 unsubscri
Schemas are "path-independent", so you have to do this at the level of the
map. The easiest way would be to use s/constrained with a predicate, e.g.,
user> (def my-map (s/constrained {Class Object} (fn matching-kvs? [m]
(every? #(isa? (type (val %)) (key %)) m
#'user/my-map
user> (s/validat