Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

add number validation#520

Merged
ninggao merged 3 commits intomastermicrosoft/botframework-cli:masterfrom
nigao/numbermicrosoft/botframework-cli:nigao/numberCopy head branch name to clipboard
Feb 4, 2020
Merged

add number validation#520
ninggao merged 3 commits intomastermicrosoft/botframework-cli:masterfrom
nigao/numbermicrosoft/botframework-cli:nigao/numberCopy head branch name to clipboard

Conversation

@ninggao
Copy link
Contributor

@ninggao ninggao commented Feb 4, 2020

No description provided.

@ninggao ninggao requested a review from chrimc62 February 4, 2020 18:28
"property": "$@{property}",
"value": "=@number"
"$kind": "Microsoft.IfCondition",
"condition":"or(and(dialogClass.schema.properties['@{property}'].minimum, less(@number, dialogClass.schema.properties['@{property}'].minimum)), and(dialogClass.schema.properties['@{property}'].maximum, greater(@number, dialogClass.schema.properties['@{property}'].maximum)))",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dialogClass.schema.properties['@{property}'].minimum [](start = 32, length = 52)

I don't think you need this. Less with null should be false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

"actions":[
{
"$kind": "Microsoft.SendActivity",
"activity": "@{callNumberAlert()}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callNumberAlert [](start = 35, length = 15)

Hmmm. Seems like we might be missing something here--a way to say do the same prompt again. In what we have generated so far, prompts tend to be predicatable, i.e. we keep doing the same one until fulfilled. If though someone used a Random secondary selector the prompt would be different. We don't need to fix this here, but it is something to think about.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. After check/alert/validation/help, we should have a way to let the users retry.

- Enter a number for @{name(property)}

# numberValidation(property, number)
- IF: @{dialogClass.schema.properties[property].minimum && less(number, dialogClass.schema.properties[property].minimum)}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dialogClass.schema.properties[property].minimum [](start = 8, length = 48)

Do you need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and removed.

Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ninggao ninggao merged commit 94c660f into master Feb 4, 2020
@ninggao ninggao deleted the nigao/number branch February 4, 2020 19:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.