Validating fields

Validating fields

<html>

<script>
function save(){

}
</script>
<form name="myform" action="http://www.mydomain.com/myformhandler.cgi" method="POST">
<div align="center"><br>
<input type="radio" name="group1" value="Milk"> Milk<br>
<input type="radio" name="group1" value="Butter" > Butter<br>
<input type="radio" name="group1" value="Cheese"> Cheese
<hr>
<input type="radio" name="group2" value="Water"> Water<br>
<input type="radio" name="group2" value="Beer"> Beer<br>
<input type="radio" name="group2" value="Wine"> Wine<br>
</div>
<button onclick = "save();" >Save</button>
</form>

</html>

In my code have two sections.When I am clicking Save button ,I didn't select any of the both sections it throws error in below of the every section.Is it possible?