(ns uxbox.ui.forms
  (:require [sablono.core :refer-macros [html]]
            [uxbox.locales :refer (tr)]
            [uxbox.schema :as sc]))

(defn input-error
  [errors field]
  (when-let [errors (get errors field)]
    (html
     [:ul.form-errors
      (for [error errors]
        [:li {:key error} (tr error)])])))

(defn error-class
  [errors field]
  (when (get errors field)
    "invalid"))

(ns uxbox.ui.forms
  (:require [sablono.core :refer-macros [html]]
            [uxbox.locales :refer (tr)]
            [uxbox.schema :as sc]))

(defn input-error
  [errors field]
  (when-let [error (get errors field)]
    (html
     [:ul.form-errors
      [:li {:key error} (tr error)]])))

(defn error-class
  [errors field]
  (when (get errors field)
    "invalid"))

Fix validation form errors rendering.
Fix validation form errors rendering.

studiospring/uxbox,uxbox/uxbox,uxbox/uxbox,uxbox/uxbox,studiospring/uxbox,studiospring/uxbox