Adaptive Cards - isRequired/errorMessage issues

Hello Cognigy Community,

I've followed instructions and used and modified the templates to build an input form with validation into my bot.

The problem is the 'isRequired' and 'errorMessage' functions aren't triggering the expected behaviour. I.e. it's letting me submit the form even when the fields in question are left empty and no error message is displaying.

Does anyone know if this is a bug or if I'm missing something here:

{
"_plugin":{
"type":"adaptivecards",
"payload":{
"type":"AdaptiveCard",
"version":"1.3",
"body":[
{
"type":"TextBlock",
"text":"Given Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"firstname",
"isRequired":true,
"errorMessage":"Name is required",
"value":"{{profile.firstname}}"
},
{
"type":"TextBlock",
"text":"Family Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"lastname",
"value":"{{profile.lastname}}"
},
{
"type":"TextBlock",
"text":"Email",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"email",
"value":"{{profile.email}}"
},
{
"type":"TextBlock",
"text":"Company Name",
"wrap":true
},
{
"type":"Input.Text",
"style":"text",
"id":"company_name",
"value":"{{profile.company_name}}"
}
 
],
"actions":[
{
"type":"Action.Submit",
"title":"Submit",
"id":"submit"
}
]
}
}
}


Didn't find what you were looking for?

New post
Was this post helpful?
1 out of 1 found this helpful

Comments

1 comment

  • Hello James,
     
    Let me duplicate my email here for history.
     
    Our webchat plugin renders adaptive cards with react-adaptivecards, which, unfortunately, doesn't support validation and some other advanced features. You can either validate the values in the flow or implement the form in your own webchat plugin.
     
    If you have any further questions, feel free to ask them in Avaya Community in our Help Center or reach out to me directly.
    0

Please sign in to leave a comment.