                          (ef/add-class "has-error"))))
 
 (defn get-item-text []
-  (ef/from "#itemtext" (ef/get-prop :value)))
+  (-> (ef/from "#itemtext" (ef/get-prop :value))
+      string/trim))
 
 (defn get-list-name []
-  (ef/from "#listname" (ef/get-prop :value)))
+  (-> (ef/from "#listname" (ef/get-prop :value))
+      string/trim))
 
 (defn add-item-to-list-model [side]
   (let [f (if (= side :end) conj #(apply vector %2 %1))

(defn render-items [items]
  (if-not (empty? items)
    [:ol
     (for [i items] [:li (:text i)])]
    [:small "No items added yet."]))

(def not-empty? (comp not empty?))


(ns checkmate.views.new-list
  (:require [clojure.string :as string]
            [enfocus.core :as ef]
            [enfocus.events :as ev]
            [checkmate.views :as views]))

