简体   繁体   English

“IsRequired”不适用于 MsTeams 中自适应卡的 Input.Text

[英]"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.

相关问题 不与Input.Text Python SDK配合使用的自适应卡上的Action.Submit - Action.Submit on Adaptive Cards not working with Input.Text Python SDK [MsTeams][BotFrameworkV4][Adaptive Card] 团队中可滚动的自适应卡 - [MsTeams][BotFrameworkV4][Adaptive Card ] Scrollable Adaptive card in teams 如何为也在 Web 聊天中工作的 MSTeams 重写自适应卡片提交操作? - How to rewrite a Adaptive Card Submit Action for MSTeams also working in Web Chat? 无论如何要增加 input.text 元素的大小? - Is there anyway to increase the size of an input.text element? 基于选择集值的自适应卡片显示文本输入块 - Adaptive Card show text input block based on choice set value 由传出 webhook 提供的 msteams 的 Adaptive Card 的 messageBack 操作失败,并显示“资源 URL 格式错误”。 - Adaptive Card's messageBack action for msteams provided by outgoing webhook fails with "The resource URL is misformatted." 自适应卡在提交时清除输入 - Adaptive Card clears input on submit MS 团队自适应卡在提交时未发送输入文本值 - MS teams adaptive card not sending input text value on submit 自适应卡在 Microsoft Teams 中不起作用 - Adaptive Card not working in Microsoft Teams 在 msteams 中安装 bot 时在弹出窗口中显示自适应卡(使用选项卡配置 url) - Show an adaptive card in popup (using tabs configuration url) while bot is installed in msteams
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM