Open
Description
Description
I implemented custom control based on official guides using ControlValueAccessor
:
- https://material.angular.io/guide/creating-a-custom-form-field-control
- https://blog.angular-university.io/angular-custom-form-controls/
The issue that validation error is not showing until we touch our custom field. In my case I have an issue with Stepper, but it also not working when I do this.form.markAllAsTouched()
Reproduction
I provided example below based on official custom Phone field.
- Click "Next" with empty fields.
Expected Behavior
Errors must be shown as for default mat-input in both cases for: mat-stepper
and this.form.markAllAsTouched()
Actual Behavior
Error is not shown for custom Tel
field
Environment
- Angular: 13+
- CDK/Material: 13+
- Browser(s): Any
- Operating System (e.g. Windows, macOS, Ubuntu): Any