home
design & development
Lotus application development
print design
web site development
request a design quote
solutions & consulting
Notes and Domino application development
Lotus Domino administration
Securence Mail Filtering
UNITRENDS backup and recovery
Lotus Notes / Domino Apps
free Lotus Notes apps
hosting
web site hosting
Lotus application hosting
check your mail
request a hosting quote
publishing
media and publishing
sound
client services
help & support
Make Payment
Client Access - Workboard
billing & payment policies
copyright & liability policies
pricing & turnaround policies
privacy statement
contact
e-mail MW
get files
send files
Validate Field for Acceptable Characters Only
Mindwatering Incorporated
Author: Tripp W Black
Created: 12/29/2005 at 08:06 AM
Category:
Notes Developer Tips
Formulas
Issue:
Need to determine if user entered invalid / illegal characters/numbers into a text field.
Solution:
The following example filters what a user enters by removing the "good" characters. When the result is not an empty string "", then the user entered "bad" character(s). You then can use the result in an if/then for passing/failing validation.
Input Translation:
@Trim(@ThisValue)
Input Validation:
msg1:="The NNNN field is required";
msg2:="Enter only a number with decimal point in the NNNN field.";
tmprmvlst:=@Explode("0;1;2;3;4;5;6;7;8;9;0;."; ";");
tmpremainlst:=@Trim(@ReplaceSubstring(@ThisValue; tmprmvlst; ""));
@If(@ThisValue=""; @Failure(msg1);
tmpremainlst!=""; @Failure(msg2);
@Success)
previous page
×