-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for soft required validation in builder #188
Merged
Conversation
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
sergei-maertens
force-pushed
the
feature/4546-soft-required-validation
branch
from
October 14, 2024 09:55
5aa1630
to
ef4e653
Compare
12 tasks
sergei-maertens
force-pushed
the
feature/4546-soft-required-validation
branch
from
October 14, 2024 10:53
ef4e653
to
a1c1d6d
Compare
robinmolen
reviewed
Oct 15, 2024
robinmolen
reviewed
Oct 15, 2024
Types contain the softRequired extension and custom component to display related errors.
sergei-maertens
force-pushed
the
feature/4546-soft-required-validation
branch
from
October 15, 2024 13:30
a1c1d6d
to
cefc973
Compare
…or soft-required fields Hard and soft required at the same time is not possible, so when the 'required' checkbox is enabled, the soft-required one is unchecked (if that's relevant) and the checkbox itself is disabled.
… building blocks' While it initially was only relevant for the content component, we will make use of this same component in the display component for the soft required validation errors. The component translations wrapper around it remains component-type specific since we can leverage the type-safety when checking validation error keys, at the cost of a little bit of code duplication.
…o display soft required validation errors The component is similar to the content component, but needs to be its own type so that we can process it in the SDK and find a target to display the form validation errors. The layout/warning scaffolding will also be fixed, and it has no meaning in the backend data, so a number of configuration options from the content component are not available (such as conditional logic, hidden/visible, display configuration, custom class).
sergei-maertens
force-pushed
the
feature/4546-soft-required-validation
branch
from
October 15, 2024 13:56
cefc973
to
0ed623c
Compare
sergei-maertens
force-pushed
the
feature/4546-soft-required-validation
branch
from
October 15, 2024 14:10
0ed623c
to
6311885
Compare
robinmolen
approved these changes
Oct 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially closes open-formulieren/open-forms#4546 - depends on open-formulieren/types#55
content
to generic builder componentsSoftRequiredErrors
that will collect all errors and display them. It supports rich text formatting.