Code for validating radio button in javascript