                         (assoc :items (extract-items params)))
         updated (transactions/update (env :db) transaction)]
     (if (validation/has-error? updated)
-      (edit transaction)
+      (edit transaction {:alerts [{:type :danger :message (str "Unable to save the transaction " (validation/get-errors updated))}]})
       (redirect (format "/entities/%s/transactions" (:entity-id updated))))))
 
 (defn delete

                     indexed-attr (map #(keyword (str (name %) "-" index)) attr)
                     item (zipmap attr (map #(% params) indexed-attr))]
                 item))) 
       (take-while #(:account-id %))
       (map ->transaction-item)))

(defn create

        (hidden-input-element (str "id-" index) id))
      (select-element (str "account-id-" index)
                      (:account-id item)
                      (account-options entity-id
                                       {:include-none? true})
                      {:suppress-label? true}))]
   [:td.col-sm-2
    (text-input-element (str "credit-amount-" index) (:credit-amount item) {:suppress-label? true})]
