I am trying to create a form that requires a person Email Address, I was wondering what I have to do to the text box format in order for it to require an Email format i.e. poakes@regis.edu. If a student doesn't enter in the correct format it will let them know.
My Product Information:
Acrobat Pro 7 / Windows
Offline

Right click the Text field for the Email address entry. Click Properties from the drop down list. Click the Validate tab, find the Run Custom Validation script then click the edit button. Paste this code in the box and close.
var re = /^\S+@\S+\.\w{3}$/
var re2 = /^\w+([-_]\w+)*@\w+(\.\w{2,3})+$/
if (re.test(event.value) == false) {
app.alert("\"" + event.value + "\" is not a valid email address.")
app.beep()
}
Note: Make this field and the following Name field required fields.
var re = /^[A-Z][a-z]+ [A-Z][a-z]+$/
if (re.test(event.value) == false) {
app.alert("That does not appear to be a valid name. I need a first and last name.")
app.beep()
}
Offline
The above code works, but only for emails with a format name@domain.com
It doesn't work for an email such as name.surname@domain.com.au
It beeps as if it is invalid.
What code do I need to add/change in order to get it to allow more formats of emails?
Offline
AcrobatUsers.com >> User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in