12
The Center for Instruction and Technology
Last Updated: 2/26/2016
Appendix
Data validation settings
Currently, only “Text,” “Paragraph text,” and “Checkboxes” questions have support for
validation. Each question type has its own validation settings.
Text
Text fields have three types of validation settings:
• Number: Ensure the answer is a number of a certain type. For example, you can specify
that the answer is a whole number or a number between 21 and 42.
• Text: Ensure the answer is text with a certain property. For example, you can restrict
answers to text containing the word “lollipop” or only accept email addresses.
• Regular Expression: Ensure that the text contains or matches a certain regular expression.
(Regular expressions are powerful, but require some know-how. See the “Regular
expressions” below to learn more.)
Paragraph text
Paragraph text fields have two possible types of validation settings:
• Text: Ensure that the answer can have up to or at least a certain number of characters. For
example, you can restrict answers to have at most 100 characters.
• Regular Expression: Ensure that the text contains or matches a certain regular
expression. (Regular expressions are powerful, but require some know-how. See the
“Regular expressions” below to learn more.)
Checkboxes
Checkboxes have two possible types of validation settings:
• Select at least: Ensure that at least a certain number of checkboxes are checked in the
answer.
• Select at most: Ensure that at most a certain number of checkboxes are checked in the
answer.
• Select exactly: Ensure that exactly a certain number of checkboxes are checked in the
answer.
Regular Expressions
Regular expressions provide a way to identify certain types of text, including particular
characters, numbers, words, or patterns of characters. Regular expressions are particularly useful
in pattern matching, as these searches are not restricted to a specific search term. Instead,
searches return patterns that match the expression specified.
To use regular expressions in data validation for "Text" and "Paragraph text," select the Regular
expression option in the validation settings.
Terms used in regular expressions
The table below shows a sample of just some of the expressions that Google Docs supports. There
are, however, many other supported expressions users can employ.