You can add in a line to set the focus back to the empty field
if (this.rawValue == "" || this.rawValue == null) {
xfa.host.messageBox("Please enter yes or no.");
xfa.host.setFocus("$");
}
you can also add in a line to set the border to red or highlight the field when the field is exited and empty to indicate it needs to be filled
if (this.rawValue !== null) {
this.ui.oneOfChild.border.fill.color.value = "225,255,225"; // green tinge
}
else {
this.ui.oneOfChild.border.fill.color.value = "255,225,225"; // red tinge
}