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.

Get Google Forms productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->