Skip to content

"There is no suitable arv-validation-message element to show the ... error of ..."  #18

Open
@askuri

Description

@askuri

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions