//Addatextitemtoaformandrequireittobeanumberwithinarange.vartextItem=form.addTextItem().setTitle('Pick a number between 1 and 100?');vartextValidation=FormApp.createTextValidation().setHelpText('Input was not a number between 1 and 100.').requireNumberBetween(1,100).build();textItem.setValidation(textValidation);
[[["เข้าใจง่าย","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"]],["อัปเดตล่าสุด 2024-08-21 UTC"],[[["`TextValidation` is used to apply specific data validation rules to text-based form responses collected through a `TextItem`."],["It enables defining criteria like number ranges, custom error messages (using `setHelpText`), and applying these constraints via `setValidation` on the target `TextItem`."],["The 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."]]],[]]