[英]"IsRequired" not working for Input.Text of Adaptive Card in MsTeams
I'm trying to add required validation to check whether the comment box is empty or not.我正在尝试添加必需的验证以检查评论框是否为空。 I have checked on multiple places and blogs to make it work but some how validation is not working at all in Teams.
我检查了多个地方和博客以使其正常工作,但有些验证在 Teams 中根本不起作用。 When i'm using Designer of Adaptive card it is working as expected.
当我使用 Designer of Adaptive 卡时,它按预期工作。
Below is the JSON code i'm using in my teams bot.下面是我在我的团队机器人中使用的JSON代码。
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "Input.Text",
"label": "Comments",
"style": "text",
"isMultiline": true,
"id": "MultiLineVal",
"isRequired": true,
"errorMessage": "required"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit"
}
]
} }
Designer Screen grab
设计师屏幕抓取
Have a look at this reference on input validation and notice that it's referrring to Adaptive Cards 1.3 and above, whereas, as explained here , Teams is currently a bit behind, supporting up to Adaptive Cards 1.2 only.查看此关于输入验证的参考,注意它指的是 Adaptive Cards 1.3 及更高版本,而如此处所述,Teams 目前有点落后,仅支持 Adaptive Cards 1.2。 The products, while related, are different and have different release cycles - hopefully 1.3 will come soon for Teams.
这些产品虽然相关,但有所不同并且具有不同的发布周期 - 希望 Teams 很快就会推出 1.3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.