Support

Account

Home Forums ACF PRO Google Maps: Validate input only, if street number is entered

Unread

Google Maps: Validate input only, if street number is entered

  • When using the Google Maps-field, one can enter an address by starting to type a street name. Once Google sends back data, you can then quickly select the street in the dropdown list and the field is valid. You can save this data.

    If you get_field this data, ACF returns: “street_name, city, country”.

    And exactly this is my issue! I do not want this field to be valid unless a user has entered a street number, too. So unless the form is “street_number street_name, city, country” or “street_name street_number, city, country”, saving should not be allowed.

    How would I achieve this kind of validation?

Viewing 1 post (of 1 total)

The topic ‘Google Maps: Validate input only, if street number is entered’ is closed to new replies.