       (assoc validated ::errors (->> errors
                                      (group-by first)
                                      (map (fn [[k tuples]]
-                                            [k (map second tuples)]))
+                                            [k (map second tuples)])) ; TODO don't double wrap vectors in lists
                                      (into {})))
       validated)))
 

                                (coerce/first-matcher [int-matcher
                                                       nil-matcher
                                                       coerce/json-coercion-matcher]))
        result (coercer model)]
    {:model (dissoc result :error)
     :errors (if (schema-utils/error? result)
               (map full-humanized-message
                    (schema-utils/error-val result))
               [])}))

(defn has-error?
  "Returns true if the specified model contains validation errors"

    (get-in model (concat [::errors] attr-keys))
    (->> (get model ::errors)
         (mapcat second)
         vec)))
