Paragraph
の DataValidationBuilder。
// Add a paragraph text item to a form and require the answer to be at least 100 // characters. const form = FormApp.create('My Form'); const paragraphTextItem = form.addParagraphTextItem().setTitle('Describe yourself:'); const paragraphtextValidation = FormApp.createParagraphTextValidation() .setHelpText('Answer must be more than 100 characters.') .requireTextLengthGreaterThan(100); paragraphTextItem.setValidation(paragraphtextValidation);
メソッド
メソッド | 戻り値の型 | 概要 |
---|---|---|
require | Paragraph | レスポンスにパターンが含まれている必要があります。 |
require | Paragraph | レスポンスにパターンが含まれていないこと。 |
require | Paragraph | レスポンスがパターンと一致しないようにする必要があります。 |
require | Paragraph | レスポンスの長さが値以上である必要があります。 |
require | Paragraph | レスポンスの長さが値より小さい必要があります。 |
require | Paragraph | レスポンスがパターンと一致している必要があります。 |
詳細なドキュメント
requireTextContainsPattern(pattern)
レスポンスにパターンが含まれている必要があります。
パラメータ
名前 | 型 | 説明 |
---|---|---|
pattern | String | テキストにパターンが含まれている必要があります |
戻る
Paragraph
- チェーン用の this
requireTextDoesNotContainPattern(pattern)
レスポンスにパターンが含まれていないこと。
パラメータ
名前 | 型 | 説明 |
---|---|---|
pattern | String | テキストにパターンを含めることはできません |
戻る
Paragraph
- チェーン用の this
requireTextDoesNotMatchPattern(pattern)
レスポンスがパターンと一致しないようにする必要があります。
パラメータ
名前 | 型 | 説明 |
---|---|---|
pattern | String | テキストがパターンと一致しないようにする |
戻る
Paragraph
- チェーン用の this
requireTextLengthGreaterThanOrEqualTo(number)
レスポンスの長さが値以上である必要があります。
パラメータ
名前 | 型 | 説明 |
---|---|---|
number | Integer | 段落のテキストの長さは、この値より大きくする必要があります |
戻る
Paragraph
- チェーン用の this
requireTextLengthLessThanOrEqualTo(number)
レスポンスの長さが値より小さい必要があります。
パラメータ
名前 | 型 | 説明 |
---|---|---|
number | Integer | 段落のテキストの長さは、この値以下にする必要があります |
戻る
Paragraph
- チェーン用の this
requireTextMatchesPattern(pattern)
レスポンスがパターンと一致している必要があります。
パラメータ
名前 | 型 | 説明 |
---|---|---|
pattern | String | テキストがパターンと一致している必要があります |
戻る
Paragraph
- チェーン用の this