包含所有验证通用的属性(例如帮助文本)的基准 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"]],["最后更新时间 (UTC):2024-12-22。"],[[["DataValidation objects define requirements for user input in Google Forms, such as specific data types or value ranges."],["These validations can be applied to form items like text fields to ensure data integrity and guide user responses."],["`getHelpText()` retrieves the message displayed to the user when input fails validation, aiding in understanding errors."]]],[]]