validate checkboxes and radios the same way