You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like this lib a lot and i'm currently using it with angular/material. It basically forces you to implement clean and reusable form-components :)
My issue:
I just split a form into a root and a sub form and am now getting unexpected behaviour with the error-messages/field validation.
Previously i used a large root form and when i clicked the submit button mat-errors would show up on any invalid inputs.
After splitting up the form mat-errors only show up on the root form inputs but not on the sub form inputs.
See my example at stackblitz.
My current workaround is to simply disable the submit button until the formGroup is valid, which does not feel right. I want the user to actually see the error messages / highlighted fields when he forgot to fill an input.
Whats more interesting to me: i'm already using an automatic-root form with sub forms inside a mat-stepper where everything works fine as long as the stepper handles the submission.
E.g <mat-stepper <mat-step [stepControl]="myRootForm"> <app-root-form #myRootForm> <!-- this component uses multiple sub-forms --> ... </app-root-form> </mat-step>
Greetings!
The text was updated successfully, but these errors were encountered:
Hi there!
I like this lib a lot and i'm currently using it with angular/material. It basically forces you to implement clean and reusable form-components :)
My issue:
I just split a form into a root and a sub form and am now getting unexpected behaviour with the error-messages/field validation.
Previously i used a large root form and when i clicked the submit button mat-errors would show up on any invalid inputs.
After splitting up the form mat-errors only show up on the root form inputs but not on the sub form inputs.
See my example at stackblitz.
My current workaround is to simply disable the submit button until the formGroup is valid, which does not feel right. I want the user to actually see the error messages / highlighted fields when he forgot to fill an input.
Whats more interesting to me: i'm already using an automatic-root form with sub forms inside a mat-stepper where everything works fine as long as the stepper handles the submission.
E.g
<mat-stepper <mat-step [stepControl]="myRootForm"> <app-root-form #myRootForm> <!-- this component uses multiple sub-forms --> ... </app-root-form> </mat-step>
Greetings!
The text was updated successfully, but these errors were encountered: