开发者

Combine errorElement and custom error placement with jQuery.validate?

开发者 https://www.devze.com 2023-03-14 00:40 出处:网络
I\'m using jQuery.validate.js to validate a bunch of fields in my form. Because of some weird layout issues with IE6, I\'ve set errorElement: \"div\" for the validator.

I'm using jQuery.validate.js to validate a bunch of fields in my form. Because of some weird layout issues with IE6, I've set errorElement: "div" for the validator.

Unfortunately one of my fields has a custom label position using <label for="type" class="error" generated="true"></label> that's now broken.

Is there a way to fix the custom error placement? I've tried changing label to div with different combinations but none of it work开发者_开发问答s.


Finally figured it out by inspecting the element with the chrome debugger. for needs to be changed to htmlfor. wtf.

<div htmlfor="type" class="error" generated="true"></div>
0

精彩评论

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