Added password validation for Restore Access flow #1224
Added password validation for Restore Access flow #1224
This commit is contained in:
parent
1e7366be6a
commit
addaeba706
|
@ -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)
|
||||
|
|
|
@ -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?))
|
||||
|
|
Loading…
Reference in New Issue