views:

695

answers:

1

Hi, Livevalidation script is great to validate forms but how you 're suppose to do with group of checkbox, radio, and select. see website : http://www.livevalidation.com/ Thanks.

A: 

For a select, you can use it just fine.

 <select name="foo" id="foo">
     <option value="" selected="selected"></option>
     <option value="value1">value1</option>
     <option value="value2">value2</option>
 </select>

But for radio buttons, it doesn't seem to work.

<input type="radio" name="bar" value="1" />
<input type="radio" name="bar" value="2" />

LiveValidation only works for elements that have an "id", which is not possible with radio buttons. Seems like a limitation of LiveValidation. Anyone has a workaround ?

maomaohuhu