theleoborges / bouncer

A validation DSL for Clojure & Clojurescript applications
364 stars 38 forks source link

Coercion for fields #55

Open ustun opened 7 years ago

ustun commented 7 years ago

Are there any plans to add coercion for fields? For example, the following fails:

(validate {:id "1"} {:id [v/positive v/number]})

Something like this could work:

(validate {:id "1"} {[:id :number] [v/positive v/number]})