开发者

Issue of jquery validate

I am using jquery validate plugin to validate my form. Why I can't add a field named 'captcha-solution' and validat开发者_如何学运维e it? When I added this field,I got js error:

missing : after property id

captcha-solution: "required",

I am very confused.Can anybody tell my why?


You can not use an object key with a -.

Try this...

'captcha-solution': "required", 

I wrapped the key in quotes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜