Added password validation for Restore Access flow #1224

Added password validation for Restore Access flow #1224
This commit is contained in:
Audrius Molis 2017-11-09 21:23:53 +02:00 committed by Oskar Thorén
parent 1e7366be6a
commit addaeba706
2 changed files with 8 additions and 3 deletions

View File

@ -18,6 +18,7 @@
(def content-type-wallet-request "wallet-request")
(def content-type-status "status")
(def min-password-length 6)
(def max-chat-name-length 20)
(def response-suggesstion-resize-duration 100)
(def default-number-of-messages 20)

View File

@ -1,6 +1,10 @@
(ns status-im.ui.screens.accounts.recover.db
(:require [cljs.spec.alpha :as s]
(:require [cljs.spec.alpha :as spec]
[status-im.constants :as const]
status-im.utils.db))
(s/def ::passphrase :global/not-empty-string)
(s/def ::password :global/not-empty-string)
(defn valid-length? [password]
(>= (count password) const/min-password-length))
(spec/def ::passphrase :global/not-empty-string)
(spec/def ::password (spec/and :global/not-empty-string valid-length?))