Class ParagraphTextValidationBuilder
Stay organized with collections
Save and categorize content based on your preferences.
ParagraphTextValidationBuilder
A DataValidationBuilder for a
ParagraphTextValidation
.
// Add a paragraph text item to a form and require the answer to be at least 100 characters.
var paragraphTextItem = form.addParagraphTextItem().setTitle('Describe yourself:');
var paragraphtextValidation = FormApp.createParagraphTextValidation()
.setHelpText('Answer must be more than 100 characters.')
.requireTextLengthGreaterThan(100);
paragraphTextItem.setValidation(paragraphtextValidation);
Detailed documentation
requireTextContainsPattern(pattern)
Requires response to contain pattern.
Parameters
Name
| Type
| Description
|
pattern
| String
| text must contain pattern
|
Return
ParagraphTextValidationBuilder
— this for chaining
requireTextDoesNotContainPattern(pattern)
Requires response to not contain pattern.
Parameters
Name
| Type
| Description
|
pattern
| String
| text must not contain pattern
|
Return
ParagraphTextValidationBuilder
— this for chaining
requireTextDoesNotMatchPattern(pattern)
Requires response to not match pattern.
Parameters
Name
| Type
| Description
|
pattern
| String
| text must not match pattern
|
Return
ParagraphTextValidationBuilder
— this for chaining
requireTextLengthGreaterThanOrEqualTo(number)
Requires response length to be greater than or equal to value.
Parameters
Name
| Type
| Description
|
number
| Integer
| paragraph text length must be greater than this value
|
Return
ParagraphTextValidationBuilder
— this for chaining
requireTextLengthLessThanOrEqualTo(number)
Requires response length to be less than value.
Parameters
Name
| Type
| Description
|
number
| Integer
| paragraph text length must be less than or equal to this value
|
Return
ParagraphTextValidationBuilder
— this for chaining
requireTextMatchesPattern(pattern)
Requires response to match pattern.
Parameters
Name
| Type
| Description
|
pattern
| String
| text must match pattern
|
Return
ParagraphTextValidationBuilder
— this for chaining
Except as otherwise noted, the content of this page is licensed under the
Creative Commons Attribution 4.0 License
, and code samples are licensed under the
Apache 2.0 License
. For details, see the
Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-05-21 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]