In this article:

Google Forms Phone Number Validation (Easiest Way in 2024)

In this article we will show you how to do phone number validation in google forms is just a few simple steps using regular expressions. Simply follow the steps below.

Google Forms Phone Number Validation

1. Add a Phone Number Question to Your Form

To add the phone number question box to Google Forms, start by clicking the Add question icon on the top of the floating box on the right side of the Google Forms. 

google forms phone number validation

The new question box will appear. By default, it is set to Multiple choice.

google form phone number validation

Type the word “Phone number” in the question text box.

google form validation phone number‍

The question type will quickly change to Short answer after you type “Phone number”. Google Forms can now guess the question type using the keywords from the question you add.

Google form question labeled phone number‍

Screencap of this step:

Add phone number question to google forms screencap

2. Enable Response validation

Google Forms has a response validation feature to check if the input follows a prescribed format. To enable it, click the three dots on the lower-right corner of the question box. 

Google forms question box more options 

A drop-down list will appear. Select Response validation.

More options for question box, select response validation‍

A set of response validation options will appear. 

Response validation options in google forms‍

Screencap of this step:

Enable response validation in google forms screencap

3. Set Response to Match Regular Expression [0-9]{10}

We are now ready to set a response validation rule for phone numbers. For example, we want to specify that the phone number input should be composed of ten numbers, without any space or dash in between. So for a phone number 

+1 505-644-9442

it should be inputted to the question box as

15056449442

The corresponding regular expression in Google is

[0-9]{10}

To set this regular expression rule, click the first drop-down box to change it from Number to Regular expression. 

Select regular expression for response validation

We then change the second drop-down box to select Matches. 

Set response validation to match a regular expression‍

We now finally paste the regular expression to the Pattern textbox besides the drop-down box. 

Paste regular expression to google forms‍

Screencap of this step:

Set response to match regular expression screencap

You are now done! If you check the form and type something that doesn’t follow the format you set, you will get an error. 

Changing the phone number to follow the format you set will remove the error.

4. Optional: Set Custom Error Message

As you can see in the previous step, not following the correct format throws an error. The error message is Must match pattern. But what pattern? We can inform the user of the correct format through a customized error message. 

In the question box with a regular expression rule set, you should notice that it also contains another small text box labeled Custom error text. For our example, we want to add the pattern so that the user can easily edit their input to follow the set format. When the input doesn’t match the format, we want the message to say

The phone number should only contain numbers without spaces in between.

We will paste this message in the remaining text box labeled Custom error text.

Screencap of this step:

Adding error text screencap

You are now done! You can check the difference:

Wrong input format detected, custom error text shown‍

Screencap of this error:

Wrong input format error message displayed

Related Articles

If you enjoyed this article, you might also like our article on setting up skip logic in Google Forms or our article on how to create an invoice in Google Forms. If you are trying to set up a response email notification in Google Forms, we also suggest checking out our detailed guide.

Automate everything you track in spreadsheets with Lido
Learn more

Level up your Google Sheets skills with our free Google Sheets automation guide

Wasting too much time doing things manually in spreadsheets? Want to spend more time doing what you love? Our 100% free, 27-page Google Sheets automation guide is full of new tips and tricks that will save you time and money!