             (merge (dissoc props :constructor)
                    {:value value
                     :ref "control"
-                    :on-change #(check-validation (.-target %))})]
+                    :on-change #(update-state (.-target %))})]
            (when validation-message
              [:div.validation-message validation-message])])))))
 

         :validation-message nil})
      om/IDidMount
      (did-mount [_]
        (check-validation (om/get-node owner "control")))
      om/IRenderState
      (render-state [_ {:keys [value validation-message]}]
        (html



(defn validated-form-control [props owner]
  (let [update-state
        (fn [input]
          (om/set-state! owner {:value (.-value input)
                                :validation-message (.-validationMessage input)}))]
