Created
November 8, 2018 02:20
-
-
Save kevinl95/a4331deddf2b2cdc98098dfd529bfee8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
action (generate) { | |
collect{ | |
input (numWords) { | |
type (NumWords) | |
min (Required) | |
max (One) | |
// add a default value of four words, like the comic | |
default-init { | |
intent { | |
goal {NumWords} | |
value { | |
NumWords (4) | |
} | |
} | |
} | |
// add a validation dialog prompt when the user indicates less | |
// than 2 sides. | |
validate { | |
if (numWords == 0) { | |
prompt { | |
dialog { | |
template ("You need to have at least one word in your password.") | |
} | |
} | |
} | |
if (numWords < 0) { | |
prompt { | |
dialog { | |
template ("You need to have at least one word in your password.") | |
} | |
} | |
} | |
} | |
} | |
} | |
output (PasswordResult) | |
type (Calculation) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment