Google表格Api。向 textQuestion 添加响应验证

Google Form Api. Adding Response validation to textQuestion

目前,据我所知,当使用 google forms API v1 执行 google 形式 batchUpdate 时,我们只能设置 shuffle 属性 choiceQuestions,而 textQuestions 没有设置 response validations 的选项,就像我想将 regex match 用作 validation

例如,请求正文如下所示:

{
  "requests": [
    {
      "createItem": {
        "item": {
          "questionItem": {
            "question": {
              "choiceQuestion": {
                "shuffle": false
              },
              "textQuestion": {
                "paragraph": false
                  /*no other parameters to set*/
              }
            }
          }
        }
      }
    }
  ]
}

我错过了什么吗?或者这个功能还没有实现?

你是对的,这还没有实现。目前,these are the only options that can be used with ChoiceQuestion This is kind of expected taking into consideration FORMS API was launched 就在上个月。

因此,您可能想为缺少的功能提交 Feature Request

与此同时,您还可以考虑使用 Google Apps 脚本及其 Forms Advanced Service 解决此问题,其中包括 response validation.