Form validation checks whether an option has been selected before the form is submitted. If no option has been selected, then an alert message will tell the user to select an option and the form will not submit the data until an option has been selected.
Watch the video below and then scroll down to see the sample code.
Here is the sample code:
Next tutorial: Checkboxes and form validation