1

I have used google places autocomplete API in an input field.

Now, I want to write a validation to select only the items in the dropdown.

I want to avoid free form text.

Please look at the code that I have written below:

<input ng-disabled="disableForm" class="form-control" ng-model="city"
 g-places-autocomplete autocomplete="off" options="autocompleteOptions" 
force-selection="true" id="city"  name="city" placeholder="City" type="text">
Arghavan
  • 1,125
  • 1
  • 11
  • 17
Harish
  • 1,193
  • 6
  • 22
  • 45

0 Answers0