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="firstform">
<input type="text" id="name">
</form>
<form action="#" method="post" id="secondform">
<input type="text" id="name_othername">
</form>
can anyone give me suggestions, how to call the first form ids
thanks
You can give both name-fields same class and instead of id you can call element by class. If you call specific form you can validate only that forms name-field: