validate radio button not working jquery

How to perform validation radiobutton. failed to perform the radio button validation when use button type button instead input type submit.

Demo :

Answers 1

  • Try this:

    $(document).ready(function() {
            foobar : 
            required: true

    Updated Fiddle

    There are so many issue with your code.

    • You have to give similar name for all the radio resides in one group, otherwise they work like checkbox.
    • Jquery validation works on name for the specific element. So name is mandatory.

    Updated Fiddle with custom message

Related Articles