Autocomplete Address Validation

Thank you @Yisrael, I’m getting somewhere now! :slight_smile:



$w.onReady(function () {
    $w("#addressInput1").onCustomValidation((value, reject) => {
        console.log('customvalidation value', value);
        let address = JSON.parse(JSON.stringify(value));
        let location = address.location;
        console.log('address',location);
        if (value !== undefined && address.location === undefined) {
             reject("Please select an address option only.");
        }
    });
});


This works now for giving an error message when the address isn’t inputted correctly. However I can’t seem to submit the form. I’m getting a 400 Bad Request in the console. Weird, I don’t have any other custom code entered in other than the above.

Thanks for the links too, I’ve been looking at them for over 6 hours now, but your guidance has really gotten me going in the right direction