Menu

#11 Problem validating radio buttons

open
nobody
None
5
2010-02-02
2010-02-02
Anonymous
No

This code
<input type="radio" name="paid" id="paid" value="true" />
<label for="paid">Paid</label>
<input type="radio" name="paid" id="unpaid" value="false" />
<label for="unpaid">Unpaid</label>
<yav:rule value="paid|required" />
does not validate on the browser side and throws a NullPointerException on the server side when none radio button is checked.

Using a default value
<input type="radio" name="paid" id="unpaid" value="false" checked="checked" />
workarounds the problem.

Discussion


Log in to post a comment.