これは私の検証機能です。フォームが 1 つある場合は正常に機能し、1 つのページに複数のフォームがある場合は機能しません。
<script>
$(function() {
$("form").validity(function() {
$("#name").require();
});
});
</script>
私のフォームは
<form action="#" method="post" id="firstform">
<input type="text" id="name">
</form>
<form action="#" method="post" id="secondform">
<input type="text" id="name_othername">
</form>
最初のフォーム ID を呼び出す方法を教えてください。