Every version of the schema I've seen says the value property of Input.Number only accepts a number.

However, I've tried using a string for the value in both Web Chat and Microsoft Teams and they work. Both of these inputs render the same:
{
"type": "Input.Number",
"id": "id-number",
"value": 7,
"placeholder": "Placeholder text"
},
{
"type": "Input.Number",
"id": "id-numberString",
"value": "7",
"placeholder": "Placeholder text"
},
Which is correct? Should the schema say "number, string" instead of just number? Or are those renderers operating contrary to the schema?
+1, though behavior has changed slightly. On Web Chat, we have used "value": 1 in the past, which would show the default value as 1. However when bumping to 1.23 recently there was a change where the 1 is no longer inserted as a value, so the input is blank. "value": "1" does work, however.
{
"$schema": "https://microsoft.github.io/AdaptiveCards/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "Input.Number",
"placeholder": "Quantity",
"min": -5,
"max": 5,
"value": 1,
"id": "NumVal",
"speak": "How many do you want?"
}
]
}
The above code shows an empty input in the visualizer.
Particularly in contrast with the min and max properties, this seems like an odd inconsistency.
For now Web Chat is using the workaround. :)
When considering that all Adaptive Card inputs send their submitted values to the bot as strings, it might make the most sense for Input.Number to _only_ accept a string value, like the other inputs. It seems like this new behavior reflects that idea.
This issue has been automatically marked as stale because it has not had any activity for 5 days.
@matthidinger - Can you comment?
@dclaux / @matthidinger this is what's causing fresh inconsistency issues around Input.Number processing across renderers. Related to issue microsoft/BotFramework-Services/#185
Hi @v-kydela. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.
Tracking with #5111 , #3829
Thanks for looking into this stale issue shalinijoshi19; Resetting staleness. @v-kydela FYI.
Most helpful comment
+1, though behavior has changed slightly. On Web Chat, we have used "value": 1 in the past, which would show the default value as 1. However when bumping to 1.23 recently there was a change where the 1 is no longer inserted as a value, so the input is blank. "value": "1" does work, however.
The above code shows an empty input in the visualizer.
Particularly in contrast with the min and max properties, this seems like an odd inconsistency.
For now Web Chat is using the workaround. :)