Multi step is merging validated data only on top level of the form data object. #533
Open
1 task done
Labels
enhancement
New feature or request
Milestone
Description
If it's expected behaviour, then please close.
I have complex form (dataType: json), which is filled via several steps (multi step form). Some of the objects, that are processed, sit not in the top of the form object. So, when I set options.validators to the part I want to validate, I must ensure that I have everywhere z.catchall(z.record(z.any())), so the data in the same subtree will not be lost.
There is a code somewhere where the validated data is merged with the current data via {...currentData, ...newValidatedData} on top level - similar issue to #532.
Maybe it's not a bug, but it would certainly be helpful, if there would be a way to say to superforms - "hey, this is not final validation, but just a step/partial, please merge, not overwrite". Would have less boilerplate to handle.
Thank you!
Konstantin
If applicable, a MRE
See above
The text was updated successfully, but these errors were encountered: