Question: 2. Write a JavaScript function which validates Username and Password when the form is submitted. Error message should be displayed in an alert dialog box.

2. Write a JavaScript function which validates Username and Password when the form is submitted. Error message should be displayed in an alert dialog box. Username and Password should not be blank. Username minimum length should be 8 characters. Only alphabets (both lowercase and uppercase) and numbers are accepted. Password minimum length should be 6 characters. Password must contain a Capital Letter and a Number. . . Password Validation Username Password Submit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
