使用Docusign REST API进行复选框验证 [英] Checkbox validation using Docusign REST API
问题描述
从Docusign Web UI中,我可以添加一个复选框组并添加如下所示的验证:
From Docusign Web UI, I am able to add a checkbox Group and add a validation like this:
但是任何一个API都无法提供相同的验证.是否有任何解决方法或其他一些API端点来添加此验证?
But same validation is not available from any of the API. Is there any workaround or some other API endpoint to add this validation?
推荐答案
可通过API使用.诀窍是您必须将每个Checkbox设置为具有一个Group,然后必须将验证规则分配给TabGroup.这是一个示例:
This is available through the API. The trick is that you have to set each Checkbox to have a Group, and then you have to assign the validation rules to the TabGroup. Here's an example:
"tabs": {
"checkboxTabs": [
{
"tabLabel": "Checkbox1",
"required": false,
"selected": false,
"pageNumber": 1,
"documentId": "1",
"recipientId": "1",
"tabGroupLabels": [
"Checkbox Group"
],
"xPosition": 308,
"yPosition": 43,
},
{
"tabLabel": "Checkbox2",
"pageNumber": 1,
"documentId": "1",
"recipientId": "1",
"tabGroupLabels": [
"Checkbox Group"
],
"xPosition": 308,
"yPosition": 59,
}
],
"tabGroups": [
{
"groupLabel": "Checkbox Group",
"locked": false,
"groupRule": "SelectAtLeast",
"minimumRequired": 1,
"maximumAllowed": 1,
"validationMessage": "Please check a box",
"documentId": "1",
"pageNumber": 1,
"tabScope": "Document",
"recipientId": "1"
}
]
}
To get an idea of how exactly to set up the group to have the validation rules you want, you might use API logging to capture the Web Console's AddEnvelopeTabs traffic. Do note that the web console uses two API calls (one to create the checkboxes, one to create the group), but your application can do it in one.
已添加
可能的 groupRule
值为 SelectAtLeast
, SelectAtMost
, SelectExactly
, SelectARange
.使用适合您的用例的值.
The possible groupRule
values are SelectAtLeast
, SelectAtMost
, SelectExactly
, SelectARange
. Use the value that fits your use case.
相关联的属性是 minimumRequired
, maximumAllowed
,具体取决于 groupRule
设置.
The associated attributes are minimumRequired
, maximumAllowed
, as appropriate to the groupRule
setting.
内部Jira DEVDOCS-2087已归档以更新文档.
Internal Jira DEVDOCS-2087 has been filed to have the docs updated.
这篇关于使用Docusign REST API进行复选框验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!