Require Street Number in Address Input

I have a sign up form in which I ask users for their address. I need their full address (house number, street, city, state and zip code). Currently, I am using the search element to pull the geographic info. Meaning the user begins to type and it auto completes.

The issue I am having is that the user can just input the city, state or county and enter that in the input field.

How do I require the user to include or begin their search with the house number?

Thanks in advance.

Hey @lebene.sewordor :slight_smile: I’m not sure if this is the best way to do this, but I just tried extracting the street number (and other address components) to make sure a full address was entered. In this example, the 5 text elements have conditional statements which check to see if parts of the address are empty, and the Next button also only becomes clickable when a full address is entered.

When an address isn’t entered it looks like:

When a full address has been entered it looks like:

Here is an example:



Note: I also looked on Stack Overflow for how to do this. They recommend using this API address validator:

1 Like

Thanks @fayewatson. This is a great idea! I figure out a similar work around. In addition to disabling the Next button, I included a condition which searches for the house number and when it comes up as empty the input box would be outlined in red. I also used the Airtooltip plugin to add a little note for the user to enter the full address. Thanks again. You are awesome!


That sounds like a great way to set it up!! My pleasure, @lebene.sewordor! :blush:

This topic was automatically closed after 70 days. New replies are no longer allowed.