Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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