Skip to content

Instantly share code, notes, and snippets.

@ngw
Created April 12, 2012 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngw/0cc62ad7996b9c5177e1 to your computer and use it in GitHub Desktop.
Save ngw/0cc62ad7996b9c5177e1 to your computer and use it in GitHub Desktop.
(defn valid? [{:keys [name]}]
(vali/rule (vali/has-value? name)
[:name "Your company must have a name"])
(not (vali/errors? :name)))
server=> (valid? {:name ""})
ClassCastException clojure.lang.Var$Unbound cannot be cast to clojure.lang.IDeref clojure.core/deref (core.clj:2078)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment