xtreamsrl / ngx-validation-errors

Angular library to easily show input validation errors
MIT License
39 stars 11 forks source link

Can't bind to 'ngxValidationErrors' since it isn't a known property of 'mat-form-field'. #24

Open untilbit opened 3 years ago

untilbit commented 3 years ago

I've included the module in the app and imported it in the app module but when i use the directive i get this error:

Can't bind to 'ngxValidationErrors' since it isn't a known property of 'mat-form-field'.

<form [formGroup]="heroForm" validationContext="USER.REGISTRATION">
    <mat-form-field *ngxValidationErrors="heroForm.get('name'); errors as errors">
      <input matInput formControlName="name" placeholder="name"/>
      <mat-error *ngIf="errors">{{errors}}</mat-error>
    </mat-form-field>
</form>

The app uses Angular 10 with Ivy enabled.