Bixby Developer Center

Guides
References

validate

optional

Lists validation rules for an input or variable. Each validation rule is a condition and an effect that is applied if the condition holds true.

Example

input (<variable>) {
...
validate {
if (exists(tempCart.pollingInformation)) {
halt {
dialog{
template ("#{value(tempCart.pollingInformation)}")
}
}
}
}

validate {
if (not exists(self.name.givenName)) {
replan {
intent {
subplan {
subplan {
value { $expr(self.name) }
goal { @prompt-behavior(AlwaysElicitation) profile.Name }
}
goal { profile.UpdateName }
}
goal { profile.Self }
}
}
}
if (not exists(self.emailAddresses)) {
replan {
intent {
subplan {
value { $expr(self.emailAddresses) }
goal { @prompt-behavior(AlwaysElicitation) contact.EmailInfo }
}
goal { profile.UpdateSelf }
}
}
}
}
...
}

Child Keys

halt
optional
Halts execution of the action with the invalid input and displays an error message
prompt
optional
A prompt to ask for a new value for the invalid input
replan
optional
Changes the plan during execution to a new intent after an optional dialog event
unlock
optional
Pauses execution if device is locked and informs users they need to unlock their device to continue