Provide an external JavaScript code that will  validate all the fields of the attached form using the following criteria: a) Name field must not be empty. b) Phone number must accept the regular expression pattern: "[0-9]{3}-[0-9]{3}-[0-9]{4}" c) Email address must not be empty and must be tested against the regular expression: /^\S+@\S+\.\S+$/ d) The Gender field field must not be empty. Use the following in the list: 1. Select an option 2. Female 3. Male 4. Prefer not to say e) The amount field must not be empty. It must only accept numeric entries between 1 and 1000 f) The Fund field must not be empty. Use the following in the list: 1. Select an option 2. Building 3. Accommodation 4. Food g) If validation passes, display an alert that captures all what the user has entered in the form(see attached figure 2)

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter5: Working With Excel Tables, Pivottables, And Pivotcharts
Section: Chapter Questions
Problem 3.12CP
icon
Related questions
Question

Provide an external JavaScript code that will  validate all the fields of the attached form using the following criteria:
a) Name field must not be empty.
b) Phone number must accept the regular expression pattern: "[0-9]{3}-[0-9]{3}-[0-9]{4}"
c) Email address must not be empty and must be tested against the regular
expression: /^\S+@\S+\.\S+$/
d) The Gender field field must not be empty. Use the following in the list:
1. Select an option
2. Female
3. Male
4. Prefer not to say
e) The amount field must not be empty. It must only accept numeric entries
between 1 and 1000
f) The Fund field must not be empty. Use the following in the list:
1. Select an option
2. Building
3. Accommodation
4. Food
g) If validation passes, display an alert that captures all what the user has entered in the form(see attached figure 2)

This page says
Pearson Charity: Donation Form
Vou've entered the following details:
Full Name: Kimberley Vu
Please complete the form. Mandatory fields are marked with a
Phone number: 012-045-1234
PERSONAL INFORMATION DETAILS
Email: kimberley.yueyahoo.com
Gender: female
Name
Kimberley Yu
Amount 10
Fund: Accomodation
Phone
012-045-1234
Email
kimberley yu@yahoo.com
OK
Female
Gender
DONATION DETAILS
10
Amount"
Fund
Accomodation
Donate
Figure 2 - Source: Obaido (2020)
Transcribed Image Text:This page says Pearson Charity: Donation Form Vou've entered the following details: Full Name: Kimberley Vu Please complete the form. Mandatory fields are marked with a Phone number: 012-045-1234 PERSONAL INFORMATION DETAILS Email: kimberley.yueyahoo.com Gender: female Name Kimberley Yu Amount 10 Fund: Accomodation Phone 012-045-1234 Email kimberley yu@yahoo.com OK Female Gender DONATION DETAILS 10 Amount" Fund Accomodation Donate Figure 2 - Source: Obaido (2020)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning