The user should select an option other than this ‘Select One’ item.Using a library to do form validation can save lots of your development time. j Query Form validation library is the most popular validation library.If you skip the messages parameter, the plugin will display default, auto-generated messages.However, You should always customize the validation error messages.You can also remove your custom validation rule, simplifying your code. Now you can ask questions directly to me on my new site ASPForums. However, radio group will need some custom handling to place the error message properly.By default, the error message is displayed next to the first radio button in the group.
See the demo @Code Pen You can apply the ‘required’ validation to the radio group.
The idea is to create a set of “validation descriptors” associated with each element in a form.
The “validation descriptor” is nothing but a string specifying the type of validation to be performed.
HTML form validation can be performed automatically by the browser.
Try the above code: The rest all will be done automatically, no need to create any js functions just this dropdown and a submit button.
This validation descriptor is valid only for drop down lists.