mirror of
https://github.com/penpot/penpot.git
synced 2026-03-13 05:46:08 +00:00
🐛 Fix problem with onboarding form
This commit is contained in:
@@ -114,6 +114,13 @@
|
||||
(s/keys :req-un [::experience-design-tool]
|
||||
:opt-un [::experience-design-tool-other]))
|
||||
|
||||
(defn- step-1-form-validator
|
||||
[errors data]
|
||||
(let [planning (-> (:planning data) (str/trim))]
|
||||
(cond-> errors
|
||||
(= planning "")
|
||||
(assoc :planning {:code "missing"}))))
|
||||
|
||||
(defn- step-3-form-validator
|
||||
[errors data]
|
||||
(let [experience-design-tool (:experience-design-tool data)
|
||||
@@ -209,6 +216,7 @@
|
||||
;; and we want to keep the filled info
|
||||
step-1-form (fm/use-form
|
||||
:initial {}
|
||||
:validators [step-1-form-validator]
|
||||
:spec ::questions-form-step-1)
|
||||
step-2-form (fm/use-form
|
||||
:initial {}
|
||||
|
||||
Reference in New Issue
Block a user