Update the validateForm() function to verify the phone number contains a number and the username is at least 2 characters long. Display "Input is invalid" in the console log if the phone number or username do not meet the requirements. Use the event method preventDefault() to avoid submitting the form when the input is invalid. Show expected
Added by Daniel M.
Step 1
Let's think step by step. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 55 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
My Form First Name Street Address State Zip Code Submit City
Akash M.
Supreeta N.
Create the page as shown in below picture. The page uses validation control both server and client side. The respective message for each validation is shown in second picture.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD