Jul 05 2022 08:50 AM - edited Jul 05 2022 08:53 AM
I'm trying to use input validation on an input.text field in my card template. According to the documentation an input.text field should be able to accept isRequired, regex and maxLength as validation properties.
When you include the regex property in the JSON though, you get the following error:
If the problem persists, contact the site administrator and give them the information in Technical Details.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": " ${formSample.participantInfoForm.title}",
"horizontalAlignment": "Center",
"wrap": true
},
{
"type": "Input.Text",
"style": "text",
"id": "SimpleVal",
"label": "Name",
"isRequired" : true,
"errorMessage": "This name doesnt look valid"
},
{
"type": "Input.Text",
"placeholder": "email address removed for privacy reasons",
"errorMessage": "Please enter a valid email address",
"label": "Your Email",
"id": "email",
"isRequired": true,
"regex": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$"
}
],
"actions": [{
"type": "Action.Submit",
"title": "Submit",
"data": {
"id": "submit"
}
},
{
"type": "Action.ShowCard",
"title": "Show Card",
"card": {
"type": "AdaptiveCard",
"body": [{
"type": "TextBlock",
"text": "Enter comment",
"wrap": true
},
{
"type": "Input.Text",
"style": "text",
"id": "CommentVal"
}
],
"actions": [{
"type": "Action.Submit",
"title": "OK"
}],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
]
}
Has anyone else encountered this issue with ACE and sharepoint online?