   (valid? [this]
     (empty? errors)))
 
-(defn create-form [value validator]
-  (->Form (reagent/atom {::value    value
-                         ::original value
-                         })
-          #(->ValidationResult (-> %
-                                 (st/validate validator)
-                                 first))))
+(deftype StructValidator [schema]
+  Validator
+  (validate [this value]
+    (->ValidationResult (-> (st/validate value schema)
+                            first))))
+(defn struct-validator [schema]
+  (->StructValidator schema))
+
+(defn create-form
+  ([value]
+   (create-form value nil))
+  ([value validator]
+   (->Form (reagent/atom {::value    value
+                          ::original value
+                          })
+           validator)))
 
 (defn handle-str-value [field]
   #(set-str-value! field (-> % .-target .-value)))

                    [:option {:value 1} "1"]
                    [:option {:value 2} "2"]]
                   [:input {:type "submit"}]
                   (.log js/console @(valid? form) (clj->js @(:value form)))
                   ])))
            {:field     "value"
             :int-field 1}


  Value
  (value [this]
    (reaction (get @value ::value)))
  (value [this default]
    (reaction (get @value ::value default)))
  (set-value! [this val]
    (swap! value
