Highlighted

Field verification - Acrobat - Mobile Phone Number and Email Address

New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

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.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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.");
}

Topics

How to, PDF forms

Views

22

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Field verification - Acrobat - Mobile Phone Number and Email Address

New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

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.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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.");
}

Topics

How to, PDF forms

Views

23

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 08, 2020 0
Most Valuable Participant ,
Sep 09, 2020

Copy link to clipboard

Copied

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.");
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
robyn_r LATEST
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Thank you so much.  Perfect.  

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0