...
Use
<mat-hint>
container if the input is required and needs a ‘required message' e.g. This field is requiredIf an input IS required, add
class=”required”
to the label, which will add a red asterix after the label to indicate the field must be completed
Code Block | ||
---|---|---|
| ||
<mat-form-field> <label class="required">Label Name</label> <input matInput type="text"> <mat-hint> Error message here </mat-hint> </mat-form-field> |
...