// Add a paragraph text item to a form and require the answer to be at least 100// characters.constform=FormApp.create('My Form');constparagraphTextItem=form.addParagraphTextItem().setTitle('Describe yourself:');constparagraphtextValidation=FormApp.createParagraphTextValidation().setHelpText('Answer must be more than 100 characters.').requireTextLengthGreaterThanOrEqualTo(100).build();paragraphTextItem.setValidation(paragraphtextValidation);
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eParagraphTextValidation is a tool in Google Forms to set validation rules for paragraph text items.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting requirements like minimum character length with help text to guide users.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eParagraphTextValidation\u003c/code\u003e through Apps Script to enforce these rules within their forms.\u003c/p\u003e\n"]]],[],null,["# Class ParagraphTextValidation\n\nParagraphTextValidation\n\nA DataValidation for a [ParagraphTextItem](/apps-script/reference/forms/paragraph-text-item).\n\n```javascript\n// Add a paragraph text item to a form and require the answer to be at least 100\n// characters.\nconst form = FormApp.create('My Form');\nconst paragraphTextItem =\n form.addParagraphTextItem().setTitle('Describe yourself:');\nconst paragraphtextValidation =\n FormApp.createParagraphTextValidation()\n .setHelpText('Answer must be more than 100 characters.')\n .requireTextLengthGreaterThanOrEqualTo(100)\n .build();\nparagraphTextItem.setValidation(paragraphtextValidation);\n```"]]