Spent a long time scratching head over this one...in the lesson called "Angular Material Input Field: Lots Of Useful Options" the <mat-error> directive isn't working. The problem occurs around 11 mins and 20 seconds in the video.
<div [formGroup]="form" class="course-details-form">
<mat-form-field floatLabel="auto">
<input matInput placeholder="Course title" formControlname="title" #title>
<mat-hint align="end">{{title.value.length}} / 60</mat-hint>
<mat-error *ngIf="courseTitle.errors?.minlength">
A minimum length of 5 characters is required.
</mat-error>
</mat-form-field>
</div>
I've tried all kinds of things, but it just seems like the minLength() validator isn't working. At the moment I have no confidence that any of the validators are working. Any clues much appreciated.
Spent a long time scratching head over this one...in the lesson called "Angular Material Input Field: Lots Of Useful Options" the
<mat-error>
directive isn't working. The problem occurs around 11 mins and 20 seconds in the video.Here's the my code:
...and here's the html code:
I've tried all kinds of things, but it just seems like the minLength() validator isn't working. At the moment I have no confidence that any of the validators are working. Any clues much appreciated.