-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shared Model][UWP] Add input validation to the object model (#3226)
- Loading branch information
RebeccaAnne
authored
Jul 31, 2019
1 parent
3c63421
commit 0ee155f
Showing
83 changed files
with
975 additions
and
345 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
samples/v1.3/Elements/Action.Submit.IgnoreInputValidation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.3", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Here are some required inputs" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input1", | ||
"isRequired": true | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input2", | ||
"isRequired": true | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.Submit", | ||
"title": "OK", | ||
"ignoreInputValidation": false | ||
}, | ||
{ | ||
"type": "Action.Submit", | ||
"title": "Cancel", | ||
"ignoreInputValidation": true | ||
} | ||
] | ||
} |
40 changes: 40 additions & 0 deletions
40
samples/v1.3/Elements/AdaptiveCard.InputNecessityIndicators.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"inputNecessityIndicators": "optionalInputs", | ||
"version": "1.3", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This one is optional" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input1", | ||
"isRequired": false | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "This one too" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input2" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "This is required" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input3", | ||
"isRequired": true | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.Submit", | ||
"title": "OK" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"inputNecessityIndicators": "none", | ||
"version": "1.3", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This input is required and has a regex" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input1", | ||
"isRequired": true, | ||
"regEx": "([A-Z])\\w+" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "This input is optional and has a regex" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input2", | ||
"isRequired": false, | ||
"regEx": "([A-Z])\\w+" | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.Submit", | ||
"title": "OK" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"inputNecessityIndicators": "requiredInputs", | ||
"version": "1.3", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Two required inputs and one optional" | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input1", | ||
"isRequired": true | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input2", | ||
"isRequired": true | ||
}, | ||
{ | ||
"type": "Input.Text", | ||
"id": "input3", | ||
"isRequired": false | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.Submit", | ||
"title": "OK" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.