Re: Prismatic Schema - Why is "both" deprecated?

2016-03-07 Thread Jason Wolfe
Yes, that use case (two different non-predicate schemas) is no longer supported. While superficially simple, it added a fair bit of complexity and had corner cases that are not present with `conditional` or `constrained`. Moreover, in our experience the primary use case for `both` by far was

Re: Prismatic Schema - Why is "both" deprecated?

2016-03-06 Thread JvJ
In this example, one of the schemas is a predicate schema. What if neither of them are? On Sunday, 6 March 2016 18:48:21 UTC-8, Jason Wolfe wrote: > > In place of (s/both long (s/pred odd?)) you can do (s/conditional odd? > long), but (s/constrained long odd?) probably provides better error >

Re: Prismatic Schema - Why is "both" deprecated?

2016-03-06 Thread Jason Wolfe
In place of (s/both long (s/pred odd?)) you can do (s/conditional odd? long), but (s/constrained long odd?) probably provides better error messages (since it validates long before odd?). I think there are some examples in the readme. If this isn't what you're looking for, can you please

Prismatic Schema - Why is "both" deprecated?

2016-03-05 Thread JvJ
I've noticed that there is the function "both" in Schema. Both says that it can be replaced by conditional, but I'm not sure exactly how to go about doing this. Can someone provide an example? Thanks -- You received this message because you are subscribed to the Google Groups "Clojure"