Open
Description
Hello,
I'm getting this error message in the console immediately after opening my page in the browser:
There is no suitable arv-validation-message element to show the 'required' error of 'description'
Controller:
// ...
import { Validators } from 'angular-reactive-validation';
// ...
addTransactionForm = this.fb.group({
description: ['', [Validators.required('A description is required')]]
// ...
});
// ...
Template:
<form [formGroup]="addTransactionForm" (ngSubmit)="onSubmit()">
<mat-form-field appearance="standard">
<mat-label>Description</mat-label>
<input matInput type="text" formControlName="description" required>
</mat-form-field>
<arv-validation-messages for="description"></arv-validation-messages>
</form>
I imported the module into my app module.
Adding <arv-validation-message key="required">
tag manually works. But as said in the manual, that's not the point of the library.
I use Angular 11.2.
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels