Skip to content

Unable to mark field programmatically as invalid #313

@mlindhout

Description

@mlindhout

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

MacOS Big Sur

Versions

Angular CLI: 11.1.0
Node: 12.3.1
OS: darwin x64

Angular: 11.1.0

Repro steps

use is described in documentation:
<mat-google-maps-autocomplete #gma
country="nl"
type="address"
required="true"
(onChange)="onAdresChange($event)"
addressLabelText="Adres"
placeholderText="Begin met typen..."
requiredErrorText="Adres is verplicht"
invalidErrorText="Dit is geen geldig adres"
(onAutocompleteSelected)="onAutocompleteSelected($event)">

When using formControl name, stacktrace appears, see bug (#305). When using the elementRef 'gma', no options to mark field as invalid.

The log given by the failure

Desired functionality

Mention any other details that might be useful

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions