Need help with this.  Add the e.preventDefault() command to prevent the browser from responding to the submit event. Create the following variables containing regular expressions: Create the regex1 variable containing a regular expression literal with a character class that matches any uppercase letter A through Z. Create the regex2 variable containing a regular expression literal that matches any single digit. Create the regex3 variable containing a regular expression with a character class containing the symbols !$#%. (Hint: you will have to use \$ for the $ symbol.) Create an if else statement that with the following conditions and outcomes:                                                                                                                                    a. If the length of pwd is less than 8, set the text content of the feedback object to “Your password must be at least 8 characters.” b. Else if the test() method with the regex1 regular expression applied to the pwd variable returns a false value, set the text content of the feedback object to "Your password must include an uppercase letter." c. Else if the test() method with the regex2 regular expression applied to pwd returns false, set the text of feedback to "Your password must include a number." d. Else if the test() method with the regex3 regular expression applied to pwd returns false, set the text of feedback to "Your password must include one of the following: !$#%". e. Otherwise, apply the submit() method to the signupForm object to submit the form for processing. 7. Save your changes to the file and then load in your web browser. Verify that the form cannot be submitted unless a password is provided that has at least eight characters with at least one uppercase letter, one digit, and one of the following characters !$#%. Also verify that if an invalid password is provided, a text message appears on the web form indicating the reason for failure.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Need help with this. 

  1. Add the e.preventDefault() command to prevent the browser from responding to the submit event.
  2. Create the following variables containing regular expressions:
    1. Create the regex1 variable containing a regular expression literal with a character class that matches any uppercase letter A through Z.
    2. Create the regex2 variable containing a regular expression literal that matches any single digit.
    3. Create the regex3 variable containing a regular expression with a character class containing the symbols !$#%. (Hint: you will have to use \$ for the $ symbol.)
  3. Create an if else statement that with the following conditions and outcomes:                                                                                                                                    a. If the length of pwd is less than 8, set the text content of the feedback object to “Your password must be at least 8 characters.”

b. Else if the test() method with the regex1 regular expression applied to the pwd variable returns a false value, set the text content of the feedback object to "Your password must include an uppercase letter."

c. Else if the test() method with the regex2 regular expression applied to pwd returns false, set the text of feedback to "Your password must include a number."

d. Else if the test() method with the regex3 regular expression applied to pwd returns false, set the text of feedback to "Your password must include one of the following: !$#%".

e. Otherwise, apply the submit() method to the signupForm object to submit the form for processing.

7. Save your changes to the file and then load in your web browser. Verify that the form cannot be submitted unless a password is provided that has at least eight characters with at least one uppercase letter, one digit, and one of the following characters !$#%. Also verify that if an invalid password is provided, a text message appears on the web form indicating the reason for failure.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
JQuery and Javascript
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education