How to validate the radio button and checkbox?
- by xasjaiod123
For radio button:
$(document).ready(function() {
$('#select-number').click(function() {
if ($('input:radio', this).is(':checked')) {
return true;
} else {
alert('Please select something!');
return false;
}
});
});
It is working fine when no radio button is selected. But When I select the radio button and submit the form Then also it is giving me the alert message 'Please select something!' Is there any good tutorials available for validation using Jquery for newbie.