These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Position validation

NancyM
Registered: Sep 25 2006
Posts: 40

I am new to LiveCycle and Javascript and I am hoping that someone can help or point me in the direction to find the answer to my question.
 
I am using a text file that needs to be verified to see if the first position contains only a 1, 2 or 0.
 
What I have is
 
var 1Var = /^d{1}$/
 
but I do not know what to do next.
  
Any help would be greatly appreciated.

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Use this regular expression in a validation script.

/^\d/.test(this.rawValue);

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script