thank you sir, love this framework :)
On Jul 2, 6:18 pm, nutron <[email protected]> wrote: > I've got this fixed (the code was using element.parentNode for some reason, > instead of element.getParent()). It'll be in the next release, in the mean > time, you can fix it by just adding this to your code (to redefine the > validator): > FormValidator.add('validate-one-required', { > errorMsg: FormValidator.getMsg.pass('oneRequired'), > test: function(element, props){ > var p = document.id(props['validate-one-required']) || element.getParent(); > return p.getElements('input').some(function(el){ > if (['checkbox', 'radio'].contains(el.get('type'))) return > el.get('checked'); > return el.get('value'); > }); > > } > }); > > On Thu, Jul 2, 2009 at 5:59 PM, TheIvIaxx (via Nabble) < > [email protected]<ml-user%[email protected]> > > > > > > > wrote: > > > In IE8 the validate-one-required throws an error. Saying that the > > given element(DIV) doesnt have a method called getElements(). in FF > > and chrome, it works fine. Not sure how the div element isnt getting > > this method. > > > This does not work: > > > <form id='form'> > > <div> > > <input type="checkbox" /> > > <input id="one" type="checkbox" class="validate-one-required" / > > > </div> > > <input type='button' value='x' /> > > </form> > > > This does work: > > > <form id='form'> > > <input type="checkbox" /> > > <input id="one" type="checkbox" class="validate-one-required" /> > > <input type='button' value='x' /> > > </form> > > > So wrapping the checkboxes in a div fails, but thats one of the key > > things about validate-one-required :) > > > Am i missing something with this? > > > Thanks > > > ------------------------------ > > View message @ > >http://n2.nabble.com/-Moo--validate-one-required-fails-in-IE8-tp31988... > > To start a new topic under MooTools Users, email > > [email protected]<ml-node%[email protected]> > > To unsubscribe from MooTools Users, click here< (link removed) >. > > ----- > The MooTools Tutorial: http://www.mootorial.comwww.mootorial.com > Clientcide: http://www.clientcide.comwww.clientcide.com > -- > View this message in > context:http://n2.nabble.com/-Moo--validate-one-required-fails-in-IE8-tp31988... > Sent from the MooTools Users mailing list archive at Nabble.com.
