            :unexist         "Event does not exist!"      
            :finished        "Event is history."
            }
-   }
-  :register {
-             :short-pass      "Password should be longer than 7 chars"  
-             :notmatch-pass   "Password doesn't match"                        
-             }
-  :user {
-         :empty-name "Username can't be empty"
-         :not-found "User not found" 
-         :exists "Username already used!"  
-         }
-  :login {
-          :invalid "Incorrect Login or password"
-          } 
+   :register {
+              :short-pass      "Password should be longer than 7 chars"  
+              :notmatch-pass   "Password doesn't match"                        
+              }
+   :user {
+          :empty-name "Username can't be empty"
+          :not-found "User not found" 
+          :exists "Username already used!"  
+          }
+   :login {
+           :invalid "Incorrect Login or password"
+           }
+   } 
   )
 
-(defn- message [&tags] (message (vec tags)))
+(defn- message [ & tgs ] (get-in errors (vec tgs)))
 
 (defn errors-string
   ([] (reduce str (map #(str "|" % "|") (vld/get-errors))))
-  ([tags] (reduce str (map #(str "|" % "|") (let [errs (vld/get-errors tags)]
-                                              (println (str "errs: " errs))
-                                              errs
-                                              )))))
+  ([tags] (reduce str (map #(str "|" % "|") (vld/get-errors tags)))
+   ))
 
 (defmacro create-rule [tag data]
   `(vld/rule ~@(list (first data)) [~tag ~(last data)] )

  [tag ve-pairs]
  `(do
     (vld/clear-errors!)
     ~@(map #(macroexpand (list 'create-rule tag %)) ve-pairs)
     (not (vld/errors? ~tag)))
  )


    [noir.validation :as vld]
    [ombs.db :as db]
    [clojure.pprint :refer [pprint]]
    [clojure.walk :refer [macroexpand-all]]
    ))

(def errors
  {
   :event {
           :empty-name      "Event name should not be empty"
