Skip to content

Instantly share code, notes, and snippets.

@kevinl95
Created November 8, 2018 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinl95/a4331deddf2b2cdc98098dfd529bfee8 to your computer and use it in GitHub Desktop.
Save kevinl95/a4331deddf2b2cdc98098dfd529bfee8 to your computer and use it in GitHub Desktop.
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