Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
var strTest = this.rawValue;
var strValid = (strTest != null)? strTest.replace(/[^\d\{\}\(\)\+\-\/\.\s]*/g, "") : null;
//--- remove the following 3 lines, if you do not want to display an error message
if (strValid != strTest){
xfa.host.messageBox("Characters allowed: 0-9{}()+-. and whitespace.", "Illegal character entered");
}
//---
this.rawValue = strValid;
var strTest = this.rawValue;
var strValid = (strTest != null)? strTest.replace(/[^A-Za-z\d\s\&\.]*/g, "") : null;
//--- remove the following 3 lines, if you do not want to display an error message
if (strValid != strTest){
xfa.host.messageBox("Characters allowed: A-Za-z0-9&. and whitespace.", "Illegal character entered");
}
//---
this.rawValue = strValid;
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies