I am trying to get this to allow me to choose either a 5 digit number, or a 10 digit number. It works fine as is for the 5 digit number, but I can't figure out how to get the second expression for the 10 digit number. I've tried the | for an "or" expression. I know it is just the way I am setting it up, just can't seem to find anything online that shows me exactly the same thing as an example, and I've tried every combination I can think of.
Any help would be greatly appreciated.
Thanks
var r = new RegExp();
r.compile("^([0-9]{5})$","i");
var result = r.test(this.rawValue);
if (result == true) {
this.fillColor = "255,255,255";
this.border.edge.color.value = "255,255,255" true;
}
else {
app.alert("You must enter the Designer's 5 digit PAX or 10 digit phone number.", 0);
this.fillColor = "255,255,0";
xfa.host.setFocus(this);
this.border.edge.color.value = "255,255,0"
}