bug #3571: Validation error 'Password confirmation doesn't match password' is shown after you fix value in 'Confirm password'

Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
Aleksandr Pantiukhov 2018-04-03 23:04:55 +02:00 committed by Goran Jovic
parent 5529772858
commit 7168896ffe
No known key found for this signature in database
GPG Key ID: D429D1A9B2EB8A8E
2 changed files with 6 additions and 1 deletions

View File

@ -44,7 +44,7 @@
[text-input/text-input-with-label
{:label (get-in steps [step :input-label])
:placeholder (get-in steps [step :input-placeholder])
:on-change-text #(re-frame/dispatch [:set-in [:accounts/create (get-in steps [step :input-key])] %])
:on-change-text #(re-frame/dispatch [:account-set-input-text (get-in steps [step :input-key]) %])
:secure-text-entry (boolean (#{:enter-password :confirm-password} step))
:error error}])

View File

@ -215,6 +215,11 @@
:dispatch-n [[:navigate-to-clean :home]
[:request-notifications]]}))
(handlers/register-handler-fx
:account-set-input-text
(fn [{db :db} [_ input-key text]]
{:db (update db :accounts/create merge {input-key text :error nil})}))
(handlers/register-handler-fx
:update-sign-in-time
(fn [{db :db now :now} _]