bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Why are these different?

Open FreekPaans opened this issue 9 years ago • 0 comments

(bouncer/validate
 {:date "2016-01-01"}
 :date validators/datetime (:mysql fmt/formatters))
Output ->
[nil {:date "2016-01-01"}]

(bouncer/validate
 {:date "2016-01-01"} 
 :date [[validators/datetime (:mysql fmt/formatters)]])
Output->
[{:date ("date must be a valid date")}
 {:date "2016-01-01" :bouncer.core/errors {:date ("date must be a valid date")}}]

From the documentation, I would've expected them to be equivalent, yet they aren't. What's going on?

FreekPaans avatar Sep 24 '16 15:09 FreekPaans