Class ParagraphTextValidationBuilder

ParagraphTextValidationBuilder

ParagraphTextValidation の 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);

メソッド

メソッド戻り値の型概要
requireTextContainsPattern(pattern)ParagraphTextValidationBuilderレスポンスにパターンが含まれている必要があります。
requireTextDoesNotContainPattern(pattern)ParagraphTextValidationBuilderレスポンスにパターンが含まれていない必要があります。
requireTextDoesNotMatchPattern(pattern)ParagraphTextValidationBuilderレスポンスがパターンと一致しない必要があります。
requireTextLengthGreaterThanOrEqualTo(number)ParagraphTextValidationBuilderレスポンスの長さが値以上である必要があります。
requireTextLengthLessThanOrEqualTo(number)ParagraphTextValidationBuilderレスポンスの長さが値未満である必要があります。
requireTextMatchesPattern(pattern)ParagraphTextValidationBuilderレスポンスがパターンと一致する必要があります。

詳細なドキュメント

requireTextContainsPattern(pattern)

レスポンスにパターンが含まれている必要があります。

パラメータ

名前タイプ説明
patternStringテキストにパターンが含まれている必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this


requireTextDoesNotContainPattern(pattern)

レスポンスにパターンが含まれていない必要があります。

パラメータ

名前タイプ説明
patternStringテキストにパターンが含まれていない必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this


requireTextDoesNotMatchPattern(pattern)

レスポンスがパターンと一致しない必要があります。

パラメータ

名前タイプ説明
patternStringテキストがパターンと一致しない必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this


requireTextLengthGreaterThanOrEqualTo(number)

レスポンスの長さが値以上である必要があります。

パラメータ

名前タイプ説明
numberInteger段落テキストの長さがこの値より大きい必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this


requireTextLengthLessThanOrEqualTo(number)

レスポンスの長さが値未満である必要があります。

パラメータ

名前タイプ説明
numberInteger段落テキストの長さがこの値以下である必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this


requireTextMatchesPattern(pattern)

レスポンスがパターンと一致する必要があります。

パラメータ

名前タイプ説明
patternStringテキストがパターンと一致する必要があります

戻る

ParagraphTextValidationBuilder — チェーン用の this