Google Maps API: How do you ensure that the Google Maps Autocomplete text is an actual address before submitting? [duplicate]
问题 This question already has answers here : Google maps Places API V3 autocomplete - select first option on enter (18 answers) Closed last month . I have a Google Maps search box using autocomplete (as the user inputs text in the field, a dropdown of address suggestions appears). I want to make sure that when a user submits the form, the text inside the field is an actual Autocomplete suggestion. My goal is to ensure that the text entered is an actual adress, rather than a random string. 回答1: I