validate
validate copied to clipboard
Spec based validation & correction for nested data structures, wildcard support, no macros
Hi! I have some data that looks like this: ``` clj {"abc" {:stat "efg"}} {"xyz" {:stat "123"}} ``` Now I tried writing a validator for it but failed so far....
``` clj (v/validate {:x #{:a :b :c}} {:x {:* (v/keyword)}}) ;; returns [{:x #{:c :b :a}} {:x {0 ("must be a keyword"), 1 ("must be a keyword"), 2 ("must be...
> this is a case of maybe unfortunate wording... when the docs talk about "applying to a key" it actually means "applying to a key's value"). Will have to reword...