On Mar 5, 5:00 am, Rodi <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm using jQuery plugin Validation by Jörn. The problem is that in
> rails the element name for an input is formated as "user[email]" so
> when I pass a rule, it doesn't recognize. here is the sample:
>
> rules: {
>         user[email]: {
>         required: true,
>         email: true
>     }
>
> }
>
> it gives me a error on firebug: "missing : after property id
> user[email]: {\n"
>
> If there is a way to pass rules with the element id instead of name,
> would solve the problem. I think...

Have you tried:

rules: {
    'user[email]': {
        required: true,
        email: true
    }
}

Not sure if that works...

--Klaus



Reply via email to