-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add number validation #520
Conversation
"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)))", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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()}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
- ELSE: | ||
- Enter a number for @{name(property)} | ||
|
||
# numberValidation(property, number) | ||
- IF: @{dialogClass.schema.properties[property].minimum && less(number, dialogClass.schema.properties[property].minimum)} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, and removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.