Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: validation message error and success

Vin free asked 5 years ago


MDBBootstrapModulesPro.forRoot()

Is added in appModule.

Using this snippet from the website:

<div class="md-form md-outline">
  <input mdbInput mdbValidate name="email" type="email" id="form8" class="form-control" [(ngModel)]="email" #input="ngModel" required pattern="[^ @]*@[^ @]*">
  <label for="form2">Email validator</label>
  <mdb-error *ngIf="input.invalid && (input.dirty || input.touched)">Input invalid</mdb-error>
  <mdb-success *ngIf="input.valid && (input.dirty || input.touched)">Input valid</mdb-success>
</div>

I get error:
1) If 'mdb-error' is an Angular component, then verify that it is part of this module.
2) If 'mdb-success' is an Angular component, then verify that it is part of this module.


Arkadiusz Idzikowski staff commented 5 years ago

Do you use lazy loading in your app? If so, then you need to add the import again in your lazy loaded module. You can use InputUtilitiesModule to import only module that contain validation components.

In case of any further problems, please show us the content of your app.module file (or any other module that you use in this case, that will depend on the structure of your app).



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.1.1
  • Device: laptop
  • Browser: chrome
  • OS: win10
  • Provided sample code: No
  • Provided link: No
Tags