Zach,
Try adding rules via the Validate method like so:
$(document).ready(function() {
$("#aspnetForm").validate({
rules: {
TitleField: {
minlength: 2
}
}
});
});
This worked for me in ASP.NET w/ master page.
On Mar 23, 10:26 pm, Zach wrote:
> I've tried to get this to work for the past 4 hours and I'm stuck.
>
> I've got a master page with the following scripts added.
>
>
>
>
> this is the form tag on my master page
>
>
>
> in the HTML output of the page, it actually renders to "aspnetForm".
>
> in the content page, this is what I have
>
>
>
> $().ready(function() {
>
> $('aspnetForm').validate();
>
> $('.TitleField').rules("add", {
> minlength: 2
> });
>
> });
>
>
> here is the control I'm trying to validate
>
> Columns="30" MaxLength="100" runat="server" EnableTheming="false"
> CssClass="TitleField" />
>
> here is the error I get when testing in IE7
>
> Microsoft JScript runtime error: '$.data(...).settings' is null or not
> an object
>
> when I go to the debug in VS, it shows the $.data as being undefined.
> What am I missing, I've tried to use a id selector as well, without
> any luck. I've tested my selectors by changing background colors, and
> they alwasy work but why isn't this thing validating?
>
> I'm probably missing something simple, any help is GREATLY
> APPRECIATED!
>
> Thanks,
>
> Zach