Iam rendering partial a view twice on the same parent view.Since each child view has 1 textbox each I have 2 textboxes. Iam trying to use JqueryValidation Plugin as in
$("#form0").validate({
rules: {
Address<%=Model.TypeName%>: {
required: true,
minLength: 8
} },
messages: {
Address<%=Model.TypeName%>: : {
required: "Please enter an address",
minLength: "Your address must consist of at least 8 characters"
}
}
I have two Model.TypeNames , 1) student, 2) parent.
When I try to validate both the textboxes( 1 for student, 1 for parent) , only the 1st one works. the second one doesnot validate. Any ideas/suggestions to make the validation work for both the textboxes would be highly appreciated.