MULTIPLE forms validation with single function

MULTIPLE forms validation with single function

Hi there

This is my validation function , it works fine when there is one form and when there are more than one form in single page its not working .

<script> $(function() { $("form").validity(function()
 { $("#name").require(); }); }); </script>

My forms are like

<form action="#" method="post" id="first form">
 <input type="text" id="name"> </form> 
<form action="#" method="post" id="second form"> 
<input type="text" id="name_othername"> </form>

can anyone give me suggestions, how to call the first form ids thanks