Views
Replies
Total Likes
//var reg = /^\d+$/; // checks whether input contains ONLY digits
var reg = /\d+/; // checks whether input contains digits AND letters
var check = reg.exec(xfa.resolveNode("#subform[0].#field[0]").rawValue);
if (check == null)
app.alert("Everything's fine!");
else
app.alert("Entering digits is not allowed!");
#subform[0]
with the name of the subform the field to check is located in and #field[0]
with the name of the field to check for digits.Views
Replies
Total Likes
Views
Replies
Total Likes
/^\d+$/
checks for one or more digits only.
xfa.resolveNode("#subform[0].#field[0]").rawValue = "";
Views
Replies
Total Likes
Views
Replies
Total Likes