// 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"]],["最后更新时间 (UTC):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```"]]