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
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):
The text was updated successfully, but these errors were encountered:
This here. It definitley does return the right value. Even if I remove the if, the mat-error does not show up.
static checkInTimeValidator(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
const checkInVon = control.get('checkInVon')?.value;
const checkInBis = control.get('checkInBis')?.value;
// Validation fails only if both times are defined and checkInVon is greater than or equal to checkInBis
if (checkInVon && checkInBis && checkInVon >= checkInBis) {
return { checkInTimeInvalid: true };
}
return null; // Kein Fehler, wenn die Zeiten korrekt sind oder eines der Felder leer ist
};
}
Is this a regression?
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:
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
The text was updated successfully, but these errors were encountered: