[jQuery] Re: Radio button validation
Oddish wrote: Thanks for the response. I went with the first option and placed a custom error label manually in the HTML, and it works great. Ok, great. -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Radio button validation
Thanks for the response. I went with the first option and placed a custom error label manually in the HTML, and it works great. On May 25, 6:44 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > There still is that positioning problem with radio buttons and > checkboxes. Currently you have two far-from-perfect options: Place the > error label for that group in the HTML (see the second example on the > demo page), or use the errorPlacement-option to override the default > positioning (insertAfter element, see custom-methods-demo). > > In case the element is completely ignored and the form is submitted as > valid, there may be another problem. You should at least see an error > label inserted behind the first radio input. An example page of your > setup may help. > > -- > Jörn Zaefferer > > http://bassistance.de
[jQuery] Re: Radio button validation
Oddish wrote: I've got a bunch of radio buttons, all with the name "type" and all with different id's (type1, type2 etc.), and for some reason the validate plugin doesn't protest when I don't select a radio button, and I don't get any javascript errors either. Here's the code: $("#addForm").validate({ focusInvalid: false, event: "blur", rules: { type: { required:true } }, messages: { type: "Please choose type" } }); - And here's the html Type 1 Type 2 - Anyone got a clue? There still is that positioning problem with radio buttons and checkboxes. Currently you have two far-from-perfect options: Place the error label for that group in the HTML (see the second example on the demo page), or use the errorPlacement-option to override the default positioning (insertAfter element, see custom-methods-demo). In case the element is completely ignored and the form is submitted as valid, there may be another problem. You should at least see an error label inserted behind the first radio input. An example page of your setup may help. -- Jörn Zaefferer http://bassistance.de