-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 [open-formulieren/open-forms#3536] Fix crash because of requiring u…
…nvalidated data to be valid The selected product IDs are required as query string inputs, but the submitted data/user input at this point is not validated yet. Using Zod to normalize the data causes crashes when the user leaves the amount field empty or enters an invalid value (like 0 or a negative value). Relaxing the validation schema is not an option, because that causes problems downstream. Instead, we discard the amount information as it wasn't used up until now yet anyway and only pass the list of product IDs that are selected, filtering out empty-ish values which accounts for no-choice-made-yet in the product dropdown.
- Loading branch information
1 parent
e4b95ae
commit ba7f83f
Showing
6 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters