     (if (= "Not logged in" username)
       (js/alert "Please login or register.")
       (try
-        (if selected-topiq
-          (add-argument stage username selected-topiq (dom/value (dom/by-id "general-input-form")))
-          (add-topiq stage username (dom/value (dom/by-id "general-input-form"))))
+        (let [text (dom/value (dom/by-id "general-input-form"))]
+          (if (> (count text) 10)
+            (if selected-topiq
+              (add-argument stage username selected-topiq text)
+              (add-topiq stage username text))
+            (js/alert "Not enough input.")))
         (dom/set-value! (dom/by-id "general-input-form") "")
         (catch js/Object e
             (js/alert e))))))

  {[:.topiq] (set-attr "id" (str "topiq-" (:id topiq)))
   [:.argument-counter] (content (-> (get-arguments (:id topiq) app) count))
   [:.argument-ref] (do->
                    (set-attr :href (str "#" (:id topiq)))
                    (listen :on-click #(om/set-state! owner :selected-topiq (:id topiq))))
   [:.topiq-text] (html-content
                   (let [text (replace-hashtags (:title topiq))]
                     (if (:detail-url topiq)
                       (clojure.string/replace
                        text
                        (re-pattern (:detail-url topiq))
                        (str "<a href='" (:detail-url topiq) "' target='_blank'> "(:detail-url topiq) " </a>"))
                       text)))
   [:.topiq-author] (content (:author topiq))
   [:.topiq-ts] (content (compute-time-diff (:ts topiq)))
   [:.topiq-vote-group] (substitute (topiq-vote-group (om/get-state owner :stage)

(ns topiq.view
  (:require [topiq.db :refer [get-topiq get-topiqs get-arguments vote-count
                                        add-topiq add-argument add-vote url-regexp]]
            [topiq.plugins :refer [render-content replace-hashtags]]
            [kioo.om :refer [html-content content after set-attr do-> substitute
                             listen prepend append html remove-class add-class]]
