          [:br]
          [:button.btn.btn-default {:type     "button"
                                    :on-click (fn [e]
-                                               (if-not (empty? (:password @profile))
-                                                 (update-password @profile))
+                                               (if-not (or (empty? (:password @profile)) (not (validation/has-value? (:password @profile))))
+                                                 (update-password @profile)
+                                                 (js/alert "Invalid Password"))
                                                (.preventDefault e))
                                    } "reset"]]))))
 

                            (do
                              ;(swap! form-state assoc :show-loading (not (:show-loading @form-state)))
                              (println "res:" res)
                              (js/alert res))
                            )})))

(defn request-password-reset [profile]

(ns ^:figwheel-always rmfu-ui.core
  (:require
    [ajax.core :refer [POST GET PUT]]
    [goog.events :as events]
    [goog.history.EventType :as EventType]
    [reagent.core :as reagent :refer [atom]]
    [reagent.session :as session]
    [reagent.validation :as validation]
    [rmfu-ui.createarticle :refer [createarticle]]
    [rmfu-ui.profile :refer [profile]]
    [secretary.core :as secretary :include-macros true])
  (:import goog.History))

(enable-console-print!)
