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 <zachary.hun...@gmail.com> 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. > > <script type="text/javascript" src="/RohmPortal/scripts/ > jquery-1.3.2.js"></script> > <script type="text/javascript" src="/RohmPortal/scripts/ > jquery.validate.js"></script> > > this is the form tag on my master page > > <form id="form1" runat="server"> > > in the HTML output of the page, it actually renders to "aspnetForm". > > in the content page, this is what I have > > <script type="text/javascript"> > > $().ready(function() { > > $('aspnetForm').validate(); > > $('.TitleField').rules("add", { > minlength: 2 > }); > > }); > </script> > > here is the control I'm trying to validate > > <asp:TextBox ID="TitleField" name="TitleField" Width="390" > 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