[jQuery] Re: Validate plugin not working

2009-03-24 Thread jdobs...@gmail.com

Perhaps it says somewhere in the doc that the name attribute is
required but I sure as hell couldn't find it.  Anyway try adding the
name attribute with the same value as your id attribute for each form
element.  You should be relieved by what you find ;)

On Mar 23, 3:29 pm, Brendon Gleeson  wrote:
> Sorry I couldn't wait for my other post to showup, so I made a typo:
>
> 
> 
> jQuery Validation test
> 
> 
> 
> $(document).ready(function(){
>     $("#poesForm").validate({
>         rules : {
>             name: {
>                    required : true
>            }
>         }
>     });
>
> });
>
> 
> 
> 
> 
>     
>     
> 
> 
> 


[jQuery] Re: jQuery Validation Plugin & ASP.NET

2009-03-24 Thread jdobs...@gmail.com

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