Theres more

An alternative way of applying the required validation rule to the DropDownList is by setting the rules option of the validate() function as follows:

rules: { DropDownListl: "required" }, messages: {

DropDownListl: {required: "Please select a state" }

errorLabelContainer: $("#message")

Note that when we define the rules as above, we don't need to specify the CSS class required in the DropDownList.

0 0

Post a comment