Ted Padova suggested that T Parker has probably written a javascript that validates a text field used to capture email addresses. If that is true where can I get a copy of the script? If not can Tom do this when he is awake?
Ted Padova suggested that T Parker has probably written a javascript that validates a text field used to capture email addresses. If that is true where can I get a copy of the script? If not can Tom do this when he is awake?
Email validation is usually done with a regular expression in the validation event for both AcroForms and LiveCycle Forms.
There are several variations, here's a simple one
var cInput = ...whatever the input is (this.rawValue or event.value) ...
var rgEx = /(\w+\.)*\w+@(\w+\.)+\w+/;
bValid = rgEx.test(cInput);
The regular expression tests groups of word characters separated by "." and a single "@" symbol. You can get much more specific than this, but remember, email addresses can vary quit a bit.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script