Question: Code example 8 - 1 $ ( document ) . ready ( function ( ) { $ ( :text, :password ) . after (

Code example 8-1
$(document).ready(function(){
$(":text, :password").after("*");
.
.
$("#member_form").submit(
function(event){
var isValid = true;
.
.
var password = $("#password").val();
if (password ==""){
$("#password").next().text("This field is required.");
isValid = false;
} else if ( password.length <6){
$("#password").next().text("Must be 6 or more characters.");
isValid = false;
} else {
$("#password").next().text("");
}
.
.
}
);
});
(Refer to code example 8-1) Which of the following doesnt the if statement in this example do?
Question 10 options:
a)
Check that the field with an id of password contains a value that has 6 or more characters
b)
Display an error message if the entry for the password field is invalid
c)
Cancel the submission of the form if the the entry for the password field is invalid
d)
Check that the field with an id of password contains an entry

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 Programming Questions!