Check if form fields are present in form state #9565
Unanswered
zoltanr-jt
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Do you mean expose registered inputs? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I have a suggestion for a new feature for check if all initially defined form keys are in the form state.
Validation currently validated the form values, but would be great to have validation if all the form inputs - registered and unregistered are present in the form state.
This type of validation would come handy when form is used in wizard and separately rendered panels
When a input is not rendered it is not registered on the form state -> but the form is still considered valid.
In more detail:
Let's say we have a form with the following initial state:
Now let's assume that the form inputs of the above states are are registered via the context and they rendering in separate tab of a step-by-step wizard.
Wizard panels
name
age
The problem:fi
then the wizard renders the first panel (step 1) it renders the input for the
name
field, and the field gets registered on the form state .IF the user skips the 2nd panel and jumps to step 3, the form state is valid but it does not contain the
age
field because the input was not rendered and this not registered.Would be nice to have feature to add a flag to check for all the mandatory field if they are present on the global form state.
Beta Was this translation helpful? Give feedback.
All reactions