function | previously cljs.spec/valid? | clojure.spec.alpha/valid? | Edit |
(valid? spec x)
(valid? spec x form)
Helper function that returns true when x is valid for spec.
(defn valid?
([spec x]
(let [spec (specize spec)]
(not (invalid? (conform* spec x)))))
([spec x form]
(let [spec (specize spec form)]
(not (invalid? (conform* spec x))))))