google-maps-autocomplete icon indicating copy to clipboard operation
google-maps-autocomplete copied to clipboard

Unable to mark field programmatically as invalid

Open mlindhout opened this issue 4 years ago • 1 comments

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

mlindhout avatar Feb 12 '21 11:02 mlindhout

This is a good point!

PR are welcome

AnthonyNahas avatar Jul 13 '21 09:07 AnthonyNahas