SoftwareSavant
SoftwareSavant

Reputation: 9737

htmlHelper.Label and jquery Validation

I am trying to do some jQuery validation. I am having a hard time getting a label into my project...

The Label will part of a jQuery UI Dialog, and whenever I have that label in my assignment jQuery UI dialog wont lode the div. I am a little confounded...

    %><%=Html.Label("",row)%><%

Validate function...

     $("#temp1").validate({
        rules: {
            HospitalFinNumber: {
                required: true,
                minlength: 6
            },
            AdminDate: { requried: true }
        }
    });

Boy howdy am I confused.

Upvotes: 0

Views: 411

Answers (1)

Aaron McIver
Aaron McIver

Reputation: 24713

This is most likely because the for attribute on the label within the generated HTML is not valid; note your casing. You need to explicitly specify this via the overloaded Html.Label method.

Upvotes: 1

Related Questions