```
importPackage(com.liquidsoft.msurvey.api);
function onNavigate(params) {
var answer = ApiClient.showAndWait($node);
var next = ApiClient.findNext($node);
return next;
}
function onNextUI(answer) {
var enterOptionsText = answer.getEnterOptionsText();
var options = enterOptionsText.names();
for (var i = 0; i < options.length(); i++) {
var aliasOpt = options.get(i);
var text = enterOptionsText.get(aliasOpt);
if (text!="" && !isInt(text)){
throw new ValidationException('Los campos capturados deben ser enteros');
}
}
}
function isInt(value) {
return !isNaN(value) &&
parseInt(Number(value)) == value &&
!isNaN(parseInt(value, 10));
}
```