Class TextValidation

TextValidation

A DataValidation for a TextItem.

// Add a text item to a form and require it to be a number within a range.
var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?');
var textValidation = FormApp.createTextValidation()
  .setHelpText(“Input was not a number between 1 and 100.”)
  .requireNumberBetween(1, 100)
  .build();
textItem.setValidation(textValidation);

发送以下问题的反馈:

此网页
Apps Script
Apps Script
需要帮助?请访问我们的支持页面