Skip to main content
Participant
September 9, 2020
Answered

Field verification - Acrobat - Mobile Phone Number and Email Address

  • September 9, 2020
  • 1 reply
  • 3055 views

I'm creating a fillable form in Adobe and I want to put some sort of verification on the following two fields

- Mobile Phone Number - for Australia - needs to be 10 digits long (and if possible I would like to format it, e.g. XXXX XXX XXX)

- Email Address - just to ensure they have put in a valid email address

 

I have next to none experience in Java script (apart from cutting and pasting provided scripts).

 

Thank you.

This topic has been closed for replies.
Correct answer try67

For the former all you need is the Format setting, it will act as a validation as well (by not allowing the user to enter an invalid value). Go to Properties - Format - Special - Arbitrary mask and enter "9999 999 999" as the mask.

 

Validating an email address, on the other hand, is extremely complicated. You can search online for some Regular Expressions that do it, or you can use a built-in (undocumented) function that does it, like this:

 

if (event.value) {
event.rc = CBIsValidEmail(event.value);

if (!event.rc) app.alert("Invalid email address.");
}

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 9, 2020

For the former all you need is the Format setting, it will act as a validation as well (by not allowing the user to enter an invalid value). Go to Properties - Format - Special - Arbitrary mask and enter "9999 999 999" as the mask.

 

Validating an email address, on the other hand, is extremely complicated. You can search online for some Regular Expressions that do it, or you can use a built-in (undocumented) function that does it, like this:

 

if (event.value) {
event.rc = CBIsValidEmail(event.value);

if (!event.rc) app.alert("Invalid email address.");
}

Participant
September 9, 2020

Thank you so much.  Perfect.