validatr icon indicating copy to clipboard operation
validatr copied to clipboard

radio button's use of document.getElementbyName results in false positives

Open awirick opened this issue 12 years ago • 0 comments

If you have more than 1 form on a page, it is possible to collide with another form that uses the same names for inputs. e.g.

<form>
<input type="text" name="input1" required>
</form>

<form>
<input type="radio" name="input1" value="single">
<input type="radio" name="input1" value="double">
</form>

The following would result in a non submitted second form on submit, due to the first form's input's required attribute.

awirick avatar May 17 '13 19:05 awirick