Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

material-dropdown-select not showing error message when form model validation fails #452

Open
Antoniossss opened this issue Dec 3, 2019 · 1 comment

Comments

@Antoniossss
Copy link

For example if I have following markup


testModel = FormBuilder.controlGroup({
  "test1": ["", Validators.required]
});

setting empty field in model makes material-input field to show default error message "enter value" while dropdown will not show any kind of errors.

@enyo
Copy link

enyo commented Jan 8, 2021

Can confirm. A simple setup also shows it:

<material-dropdown-select
  [options]="statusOptions"
  [(ngModel)]="statusValue"
  [required]="true"
  deselectLabel="Deselect"
  #status="ngForm"
  ngControl="status"
></material-dropdown-select>

<div>{{status.valid}} {{status.errors}}</div>

This shows that the status.valid is false and that there is a required validation error, but the select doesn't show anything.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants