DataValidation พื้นฐานซึ่งมีพร็อพเพอร์ตี้ที่ใช้ร่วมกันในการตรวจสอบทั้งหมด เช่น ข้อความช่วยเหลือ
คุณสามารถเพิ่มการตรวจสอบในรายการ Form บางรายการได้
//Addatextitemtoaformandrequireittobeanumberwithinarange.vartextItem=form.addTextItem().setTitle('Pick a number between 1 and 100?');vartextValidation=FormApp.createTextValidation().setHelpText(“Inputwasnotanumberbetween1and100.”).requireNumberBetween(1,100);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"]],["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eDataValidation objects define requirements for user input in Google Forms, such as specific data types or value ranges.\u003c/p\u003e\n"],["\u003cp\u003eThese validations can be applied to form items like text fields to ensure data integrity and guide user responses.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetHelpText()\u003c/code\u003e retrieves the message displayed to the user when input fails validation, aiding in understanding errors.\u003c/p\u003e\n"]]],[],null,[]]