mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 00:01:51 -05:00
🐛 Fix problem with onboarding form
This commit is contained in:
parent
e8b4389a1a
commit
2fee0254b7
1 changed files with 8 additions and 0 deletions
|
@ -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 {}
|
||||
|
|
Loading…
Add table
Reference in a new issue