The rules are associated with the attribute "name" and not the attribute 
"id" of the field.
I think the plugin does not accept attribute "name" with dot "."

Victor Kornov escreveu:
> Subject pretty much states it all.
>
> Details: I have a form like this
>
> <form action="register.castle" method="post" id="register">
>     <label for="account_name">Name</label>
>     <input type="text" id="account_name" name="account.name" value=""
> class="textbox" />
>     <br /><span class="descr">some description</span>
>
>     <label for="password">Password</label>
>     <input type="password" id="password" name="password" value=""
> class="textbox" />
>     <span class="descr">more description</span>
>
>     <input type="image" src="register-button.gif" alt="Register" />
> </form>
>
> and setup validation like:
>
> $(function() {
>       $('#register').validate({
>               debug: true,
>               submitHandler: function() { alert("submitted!"); },
>               rules: {
>                       account_name: "required"
>                       password: {
>                               required: true,
>                               minlength: 6
>                       }
>               }
>       });
> });
>
> So, when I leave the form blank and click the register input,
> validation fires up and displays default "required" message for
> password field, but not for account_name field. SubmitHandler shows
> the alert. Seems like fields with dot(s) in their names are ignored
> somehow.
>
>   

Reply via email to