Class TextValidation
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
পাঠ্য যাচাইকরণ একটি Text Item
জন্য একটি ডেটা যাচাইকরণ।
// Add a text item to a form and require it to be a number within a range.
const form = FormApp.create('My form');
const textItem =
form.addTextItem().setTitle('Pick a number between 1 and 100?');
const textValidation =
FormApp.createTextValidation()
.setHelpText('Input was not a number between 1 and 100.')
.requireNumberBetween(1, 100)
.build();
textItem.setValidation(textValidation);
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eTextValidation\u003c/code\u003e is used to apply specific data validation rules to text-based form responses collected through a \u003ccode\u003eTextItem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt enables defining criteria like number ranges, custom error messages (using \u003ccode\u003esetHelpText\u003c/code\u003e), and applying these constraints via \u003ccode\u003esetValidation\u003c/code\u003e on the target \u003ccode\u003eTextItem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe example demonstrates setting a numeric constraint, requiring user input to fall between 1 and 100 with a clear error message if the input is invalid.\u003c/p\u003e\n"]]],[],null,["# Class TextValidation\n\nTextValidation\n\nA DataValidation for a [TextItem](/apps-script/reference/forms/text-item).\n\n```javascript\n// Add a text item to a form and require it to be a number within a range.\nconst form = FormApp.create('My form');\nconst textItem =\n form.addTextItem().setTitle('Pick a number between 1 and 100?');\nconst textValidation =\n FormApp.createTextValidation()\n .setHelpText('Input was not a number between 1 and 100.')\n .requireNumberBetween(1, 100)\n .build();\ntextItem.setValidation(textValidation);\n```"]]