Question: 7.7 Form Validation Needing help to figure out what I am doing wrong! Question: Fill the validateForm function to check that the phone number contains

7.7 Form Validation

Needing help to figure out what I am doing wrong!

Question: 7.7 Form Validation Needing help to figure out what I am doing

Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name is less than 11 characters long. Display "Phone number is invalid" and/or "User name is invalid" in the console log if the check does not pass. Use the preventDefault function to avoid submitting the form when the inputs are invalid. HTML JavaScript function validateForm(event) { let phoneNumber = form.phoneNumber.value; let userName = form.userName.value; 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 /* Your solution goes here */ if(!isNaN(phoneNumber)) { if(userName.length

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!