web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / isRequired tag/flag in...
Copilot Studio
Answered

isRequired tag/flag in Adaptive Cards v 1.3 not working

(0) ShareShare
ReportReport
Posted on by 242

Hello,

 

I am using the below section for the adaptive card, but it is not displaying the card 

 

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "Please provide your details for correspondence"
        },
        {
            "type": "Input.Text",
            "placeholder": "Please enter your Name",
            "id": "Name"  , 
            "isRequired": true,
            "errorMessage": "Required input"
        },
        {
            "type": "Input.Text",
            "placeholder": "Please enter your Email Address",
            "id": "Email",
            "regex": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+[.][A-Za-z0-9-]{2,4}$",
            "errorMessage": "Please enter a valid email address"  
                   
        },
        {
            "type": "Input.Text",
            "placeholder": "Please enter your Phone Number",
            "id": "Telephone"
        },
        {
            "type": "Input.ChoiceSet",
            "id": "PreferredContact",
            "style": "expanded",
            "label": "Preferred mode of contact is?",
            "isMultiSelect": false,
            "value": "1",
            "choices": [
              {
                "title": "Email",
                "value": "1"
              },
              {
                "title": "Phone",
                "value": "2"
              },
              {
                "title": "Any",
                "value": "3"
              }
            ]
        },
        {
            "type": "ActionSet",
            "actions": [
                {
                    
                    "type": "Action.Submit",
                    "title": "Submit",
                    "style": "positive"
                }
            ]
        }
    ],
    "version": "1.3"
}
 
view in the bot:
nikviz_0-1663842016698.png

 

However, if i remove the isRequired flag, i am getting the template as below

 

nikviz_1-1663842191787.png

 

but, i want the field to be mandatory, is there any way i can do this?

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,916 Most Valuable Professional on at

    Hi @nikviz,

     

    What I can see in the Adaptivecards designer on https://adaptivecards.io/designer is that when you make a Input.Text control required you would also need label and errorMessage properties in your json.

     

    label_errormessage.png

     

    Can you try something like below and see if that makes a difference?

     

     

    {
     "type": "Input.Text",
     "placeholder": "Please enter your Name",
     "label": "Name",
     "id": "Name", 
     "isRequired": true,
     "errorMessage": "Required input"
    }

     

     

     

    Also tested it with the json below.

     

     

    {
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "type": "AdaptiveCard",
     "version": "1.3",
     "body": [
     {
     "type": "TextBlock",
     "text": "Default text input"
     },
     {
     "type": "Input.Text",
     "id": "defaultInputId",
     "label": "Comment",
     "errorMessage": "This is not valid",
     "isRequired": true,
     "placeholder": "enter comment",
     "maxLength": 500
     },
     {
     "type": "TextBlock",
     "text": "Multiline text input"
     },
     {
     "type": "Input.Text",
     "id": "multilineInputId",
     "placeholder": "enter comment",
     "maxLength": 500,
     "isMultiline": true
     },
     {
     "type": "TextBlock",
     "text": "Pre-filled value"
     },
     {
     "type": "Input.Text",
     "id": "prefilledInputId",
     "placeholder": "enter comment",
     "maxLength": 500,
     "isMultiline": true,
     "value": "This value was pre-filled"
     }
     ],
     "actions": [
     {
     "type": "Action.Submit",
     "title": "OK"
     }
     ]
    }

     

     

    label_errormessage02.png

  • nikviz Profile Picture
    242 on at

    Hello @Expiscornovus 

    Thank you. It worked. The link  https://adaptivecards.io/designer is really helpful as I was just using https://adaptivecards.io/explorer/Input.Text.html to get the parameters.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
11manish Profile Picture

11manish 225

#2
sannavajjala87 Profile Picture

sannavajjala87 220 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 184

Last 30 days Overall leaderboard