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

validating email address

Anonymous
Answered

Hi all,

Can anyone help me with hopefully a simple validation script?!

I have a form that asks you to fill in an email address, you then have to confirm the email address by entering it again in a new field to make sure that it is the same.

Is there away i can place some code in the confirm email field so that if it differs from the previous field, then it flags a warning/error.

Any help would be greatly appreciated!

Thank you

My Product Information:
Acrobat Pro 9.3.1, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
If the first field is called email1 and the second email2, you can use something like this as the Validation script of email2:
email1 = this.getField("email1").value;if (event.value!=email1) app.alert("Problem!");

Be aware that this will not work if field1 is edited, then field2, and then field1 once again.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

smitchell15 (not verified)
Genius!

Thank you very much! Worked a treat!

Cheers