diff --git a/src/formulare/core.clj b/src/formulare/core.clj index 9f4dd93..2a50f9a 100644 --- a/src/formulare/core.clj +++ b/src/formulare/core.clj @@ -122,7 +122,7 @@ (str (hash [def values]))) (defn render-widgets [form-def values req] - {:pre [(spec/assert ::form form-def)]} + {:pre [(spec/valid? ::form form-def)]} (let [form-hash (form-hash form-def values) submitted-hash (get-in req [:params :__form-hash]) validate? (= form-hash submitted-hash)] @@ -141,7 +141,7 @@ (anti-forgery-field)))) (defn form-data [form-def req] - {:pre [(spec/assert ::form form-def)]} + {:pre [(spec/valid? ::form form-def)]} (reduce (fn [coll [id field]] (let [value (get-in req [:params id])] (assoc coll