0
$('#webForm').validate({

                            rules : {

                                chos: {
                                    required : true,

                                },

                            },
                            messages : {

                                chos: "Please select radio button" ,

                            },

                        });
                    });

<input type="radio" name="chos" value="phone"/>
<input type="radio" name="chos" value="email"/>

The above code is not working. I need radio buttton validation for the above code.

calvinf
  • 3,754
  • 3
  • 28
  • 41
reju
  • 31
  • 3
  • 6
  • possible duplicate of [Validation of radio button group using jQuery validation plugin](http://stackoverflow.com/questions/277589/validation-of-radio-button-group-using-jquery-validation-plugin) – Haim Evgi Feb 03 '11 at 11:37
  • srry its not working for me ..plz help – reju Feb 03 '11 at 11:44

1 Answers1

2

The provided code is not valid object notation (although it may be accepted by some browsers). Try:

$('#webForm').validate({
    rules : {
        chos: {
            required : true
        }
    },
    messages : {
        chos: "Please select radio button"
    }
});
Adolph Trudeau
  • 351
  • 1
  • 8