PrepAway - Latest Free Exam Questions & Answers

Which two code segments should you add?

You are developing an ASP.NET Web page that uses jQuery validation.
The user should enter a valid email address in a text box that has ID txtEmail. The page must display “E-Mail
address required” when the user does not enter an address and “Invalid e-mail address” when the user enters
an address that is not formatted properly.
You need to ensure that the appropriate error message is displayed when the text box does not contain a valid
e-mail address.
Which two code segments should you add? (Choose 2)

PrepAway - Latest Free Exam Questions & Answers

A.
txtEmail:
{
messages:
{
required: “E-mail address required”,
email: “Invalid e-mail address”
}
}

B.
messages:
{
txtEmail:
{
required: “E-mail address required”,
email: “Invalid e-mail address”
}
}

C.
txtEmail:
{
rules:
{
required: true
email: true
}
}

D.
rules:
{
txtEmail:
{
required: true
email: true
}
}

Explanation:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=310


Leave a Reply