question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card validations are not working

See original GitHub issue

I have tried to do Validations in card, it’s working only in emulator but I need these validations to be work in msteams and webchat and some other channels. The below two type of templates I have used with version 1.2


{
  "type": "AdaptiveCard",
  "inputNecessityIndicators": "requiredInputs",
  "displayInputSuccessIndicators": true,
  "version": "1.2",
  "body": [
    {
      "type": "TextBlock",
      "text": "Please confirm your username"
    },
    {
      "type": "Input.Text",
      "id": "username",
      "placeholder": "Username",
      "isRequired": true,
      "regex": "^\\w{5,50}$",
      "errorMessage": "Username must be between 5 and 50 characters long."
    },
    {
      "type": "Input.Toggle",
      "id": "accept",
      "title": "I accept the policy",
      "isRequired": true,
      "errorMessage": "You must accept the policy."
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Confirm",
      "data": "action=confirm"
    },
    {
      "type": "Action.Submit",
      "title": "Cancel",
      "data": "action=cancel",
      "ignoreInputValidation": true
    }
  ]
}

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2",
    "body": [
        {
            "type": "Container",
            "items": [
                {
                    "type": "Container",
                    "items": [
                        {
                            "text": "Fill the following properties",
                            "type": "TextBlock"
                        }
                    ]
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "placeholder": "enter email",
                    "type": "Input.Text",
                    "id": "email",
                    "validation":{
                        "necessity":"required",
                        "errorMessage":"email is Required"
                    }
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "placeholder": "enter phone numer",
                    "type": "Input.Text",
                    "id": "phonenumber",
                    "validation":{
                        "necessity":"required",
                        "errorMessage":"Phone number is Required"
                    }
                }
            ]
        }
    ]
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KoradaRajeshcommented, Jun 5, 2020

Sure @shalinijoshi19 Thank you!

0reactions
Wajeed-msftcommented, Jul 17, 2021

Currently there are no updates on this which I can share.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Card error, unable to render, or no image: READ THIS FIRST
There is much more Troubleshooting information on our Developer site. 11 Likes. Card Validator - preview removal · "Unable to render Card ......
Read more >
Validation not working in Adaptive Card
Validation not working in Adaptive Card. ‎12-07-2022 11:13 PM. Hi,. I am extending the Power Virtual Agent in Composer. I am using Adaptive...
Read more >
Why isn't my credit card validation working?
Seems you are trying to get the text input object instead of its value. You need to change your ccNum variable assignment to,...
Read more >
Validation Error
This means that we were unable to verify your credit card. The error code number may vary, as there can be several different...
Read more >
Twitter Card Validator - How to fix your Twitter Cards Fast
Fixing all your Twitter Card Validator errors (metatags, images, cache, ... The same goes when the Twitter card validator is not showing the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found