How to Use Response Validation in Google Forms

Short answer

To add response validation in Google Forms:

  1. Click a Short answer, Paragraph or Checkboxes question.
  2. Click the three dots at the bottom right, then Response validation.
  3. Choose a rule, such as Number, Length or Regular expression, and type a custom error text.

Without that text, a Regular expression rule shows only "Must match pattern".

How do I add response validation in Google Forms?

Response validation, sometimes called data validation, is a rule that checks an answer before the form submits. If the answer breaks the rule, the respondent sees your error message. Here is how to add one to a phone number question:

  1. Add a question and choose Short answer in the question type menu.
  2. Click the three dots at the bottom right, then Response validation.
  3. Choose a rule and a condition, such as Regular expression and Matches.
  4. Type what the rule checks. For a 10-digit phone number, the pattern is ^[0-9]{10}$.
  5. Type a Custom error text, then turn on Required.
A Google Forms short answer question called Phone number with response validation set to Regular expression, Matches, a 10-digit pattern and a custom error text
Short answer (1), the three dots (2), the rule (3), the pattern (4), and the error text and Required (5).

Turn on Required as well. Validation only checks answers that people type, so an empty optional question still gets through.

What does "Must match pattern" mean in Google Forms?

It's Google's default error for a Regular expression rule. The answer doesn't fit the pattern, and the form owner didn't add a message to explain it.

Leave the custom error text empty, type "555-123" into the phone question, and Google shows only "Must match pattern". The respondent can't tell whether the problem is the dash, the length or something else.

Google Forms preview where the answer 555 123 4567 shows the custom error Enter 10 digits, no spaces, with the Submit button greyed out
With a custom error text, the respondent sees what to fix. Submit stays grey until they do.
  • If you made the form: add a Custom error text that says what to type, like "Enter 10 digits, no spaces".
  • If you're filling it in: try the answer without spaces, dashes or capital letters. If it still fails, ask the form owner what format they want.

Which validation rules can each question type use?

It depends on the question type. Short answer has the most rules, and many types have none.

The response validation rule menu in Google Forms open on a short answer question, listing Number, Text, Length and Regular expression
The four rule types for a Short answer question.
Question typeRules you can use
Short answerNumber (such as greater than or between), Text (contains, doesn't contain, email, URL), Length and Regular expression
ParagraphLength and Regular expression
CheckboxesSelect at least, at most or exactly a number of boxes. See limiting checkboxes
Multiple choice grid and checkbox gridRequire a response in each row, and limit to one response per column
Multiple choice, dropdown, date and timeNone. Google's help lists no rules for them

To allow only numbers, use Number with Is number, or Whole number for no decimals. For email addresses, use Text and Email. Our email verification guide covers what that rule misses.

Google Forms regular expression examples

A regular expression (regex) is a pattern that the whole answer has to follow. Choose Regular expression, then Matches, and paste one of these into the Pattern box:

To acceptPatternExample answer
A 10-digit phone number^[0-9]{10}$5551234567
A US phone number with dashes^[0-9]{3}-[0-9]{3}-[0-9]{4}$555-123-4567
A US ZIP code^[0-9]{5}(-[0-9]{4})?$94105 or 94105-1234
Letters and spaces only^[A-Za-z ]+$Jane Smith
A student ID like AB1234^[A-Z]{2}[0-9]{4}$AB1234
An email from one domain^[^@ ]+@yourschool\.edu$[email protected]
No more than 100 words^\W*(\w+\W*){0,100}$Any answer of 100 words or fewer

Two tips save most of the trouble:

  • Use Matches, not Contains. Matches checks the whole answer, so "abc5551234567xyz" fails the phone rule. Contains only looks for the pattern somewhere in the answer.
  • Test before you share. Open the preview and type one good and one bad answer. A typo in a pattern can block every respondent.

How do I set a character or word limit in Google Forms?

Use Length for characters and a regular expression for words:

  • Characters: choose Length, then Maximum character count or Minimum character count, and type the number.
  • Words: Google has no word count rule. Use the last pattern in the table above and change 100 to your limit.

Short answer and Paragraph both take these rules. Put the limit in the question text too, such as "In 100 words or fewer". People then know it before they start typing.

What Google Forms response validation can't do

Google Forms validation checks the format of an answer and nothing else. It falls short in five places:

  • One rule per question. You can't ask for "10 digits" and "starts with 07" as two rules with two messages. You combine them into one pattern.
  • Regex for everyday checks. Letters only, a phone format or a school email domain all need a pattern, and most form owners don't write regex.
  • No phone format by country. A pattern for US numbers rejects a valid UK number. You need a pattern per country, or a loose one that lets typos through.
  • No check that it's real. A number in the right format may not exist, and an email in the right format may not be reachable.
  • No rules on choice questions. Multiple choice, dropdown, date and time can't be validated.

What do people use instead of Google Forms validation?

None of the most-installed Google Forms add-ons is built just for validation. So people end up with one of these:

OptionHow it worksThe catch
FormfacadeShows your Google Form in its own design, with its own validation settingsIts rules are the same types as Google's: number, text, length and regex. Paid after a 7-day trial, from $8 a month for up to 300 responses a month.
Apps ScriptCode that runs when a response arrivesIt can't stop a bad answer, only act after it's saved. Someone has to write the code and keep it working.
Fixing answers by handYou correct bad answers in the linked Google SheetThe mistakes are already in your data, and new ones arrive with every response.

So you still write regex, pay per response, or clean up afterwards. Prices come from each maker's own pricing page.

Validate answers without regex: Google Forms vs FormNX

In FormNX, validation rules come ready-made. Open a field, click More validation rules and pick from the list. You can stack several rules on one field, and each rule gets its own error message.

What you wantGoogle FormsFormNX
Number, length and email checksYesYes
Your own error messageYesYes, one per rule
More than one rule on a questionNoYes
Letters only or letters and numbersOnly with regexYes, ready-made
Starts with or ends withOnly with regexYes, ready-made
Only emails from your domainOnly with regexYes, Ends With on the Email field
Phone numbers checked by countryNoYes, Phone field
Verify an email with a codeNo, add-on neededYes, on paid plans

Every validation rule above is on the free plan, with unlimited forms and responses. Only the email code (OTP) is paid, in Pro from $19 a month or $190 a year, with a 30-day money-back guarantee.

There's nothing to install, no price per response and no code to look after. If you get stuck, you can ask support over live chat.

The rules you get in FormNX

  • Text: Letters Only, Alphanumeric, Digits, Starts With, Ends With and Contains. The last three take a list, one keyword per line.
  • Length and numbers: Minlength, Maxlength, Minimum Value and Maximum Value.
  • Formats: Email, URL, Phone and Phone US. Allowed values accepts only answers from your list, such as a set of event codes.
  • Phone field: pick one country, several or all. FormNX checks the number against that country's format as people type.

The validation rules documentation shows each rule with screenshots. The Phone field documentation covers the country setting.

Start faster

  • Bring your Google Form. In FormNX, click New Form, then Import from Google Forms. Paste your form's public link, and FormNX copies its questions into a new form. Then swap your patterns for ready-made rules.
  • See every field. The form fields page lists all 35+ field types, including Phone and Email.

Validation without writing regex

Pick ready-made rules like Letters Only or Phone. Stack them on one field, each with its own message.

Try FormNX free

Free plan available. All validation rules are free.

Common problems with response validation

What happenedHow to fix it
Response validation isn't in the three dots menuThe question type has no rules. Change it to Short answer, Paragraph or Checkboxes.
Every answer shows "Must match pattern"The pattern has a typo, or it doesn't allow spaces or capitals people type. Test it in the preview and add a custom error text.
Wrong answers still get throughThe condition is Contains, which accepts any answer that includes the pattern. Change it to Matches.
Blank answers get throughTurn on Required. Validation doesn't check empty answers.
Old responses break the new ruleRules only apply to new answers. Fix older ones in the linked sheet.

To compare the two builders in full, see the Google Forms alternative page.

FAQ

Questions people ask about this

  • What is response validation in Google Forms?

    It is a rule that checks an answer before the form submits. It works on Short answer, Paragraph, Checkboxes and grid questions. A rule can ask for a number between 1 and 10, an email format, a minimum length or a pattern. If the answer breaks the rule, Google shows your error message and Submit stays greyed out.

  • How do I validate a phone number in Google Forms?

    Use a Short answer question with Regular expression and Matches. For a 10-digit number, paste ^[0-9]{10}$. For the 555-123-4567 format, use ^[0-9]{3}-[0-9]{3}-[0-9]{4}$. Google can't add the dashes for people, so show the format in the question and in your error text. It can't check numbers by country either, so international numbers need a looser pattern.

  • How do I allow only numbers in a Google Form answer?

    Click the three dots on a Short answer question, then Response validation. Choose Number, then Is number. To block decimals, choose Whole number instead. For digits only, with no minus sign or decimal point, use Regular expression, Matches and ^[0-9]+$. That one keeps the leading zeros in ID numbers.

  • Can I add more than one validation rule to a question?

    No. Google Forms allows one rule per question. To check two things, such as 10 digits that start with 07, combine them in one regular expression: ^07[0-9]{8}$. You then get one error message for both. FormNX lets you stack several rules on one field, each with its own message.

  • What does "* Indicates required question" mean?

    Questions marked with a red star must be answered before the form submits. Google adds that line at the top of any form with a required question. To make a question required, turn on Required at the bottom of it. Validation only checks answers people type, so turn on Required as well.

  • Is there a word limit on Google Forms short answers?

    Not by default. Google Forms has no word count rule, so set one with response validation. Choose Regular expression and Matches, then paste ^\W*(\w+\W*){0,50}$ for 50 words. For characters, choose Length and Maximum character count. Say the limit in the question too, because the error only shows once people go over.

  • How do I make an answer match an exact code or word?

    Use Regular expression with Matches and type the code between ^ and $, like ^SPRING25$. Only that exact answer passes, and capital letters count. To accept any answer that includes the word, choose Text and Contains instead. Teachers use this for escape room puzzles and passcodes.

  • How do I set a minimum or maximum number in Google Forms?

    Choose Number as the rule, then a condition such as Between, Greater than or Less than or equal to. Type the limits, like 18 and 99 for an age. Answers outside the range get your error text. Date questions have no rules, so ask for an age as a number when you need a range.

Validate answers without writing regex

FormNX has ready-made rules like Letters Only, Starts With and Phone. Stack them on one field, each with its own message. All validation rules are on the free plan.

Create a free FormNX account

No credit card required. Already have a Google Form? Import it in one click by pasting its link.


© 2023 - 2026 FormNX, By The Web Fosters.