Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Using Angular 19 with Material 19
When trying to display a mat-error - even without form validation - it does not show.
When replacing the mat-error with mat-hint it does show correctly.
If i add mat-hint before adding mat-error, both messages show correctly.
Here is my example code:
<mat-form-field>
<mat-label>Checkin bis</mat-label>
<input matInput [formControl]="checkInBisControl" [matTimepicker]="toHoursPicker"
[(ngModel)]="placeData().checkInBis" />
<mat-timepicker-toggle matIconSuffix [for]="toHoursPicker" />
<mat-timepicker interval="1h" #toHoursPicker />
@if(platzForm.hasError('checkInTimeInvalid')) {
<mat-hint>
<strong>Checkin-Zeit 'von' muss vor der Checkin-Zeit 'bis' liegen.</strong>
</mat-hint>
<mat-error>
<strong>Checkin-Zeit 'von' muss vor der Checkin-Zeit 'bis' liegen.</strong>
</mat-error>
}
</mat-form-field>
Reproduction
Stacklitz has some issues with angular material 19 - at least i am unable to do that
Expected Behavior
Show the error-message under the timepicker
Actual Behavior
Does only show if switched to mat-hint
Environment
- Angular: 19.0.0
- CDK/Material: 19.0.0
- Browser(s): Chrome
- Operating System (Windows 11):