hey guys,
I"m using Jquery form validation which in the basic form looks like this
$('#shopping_form').validate({
submitHandler: function(){
$.post("/url", { message: messageval}, function(data) {
......
......
},
}
,rules: {
message: { required:true },
price: { number: true }
}
});
Now I am adding two radio buttons to this form call them radio1 and radio2. If radio1 is selected then the field message is required and for radio2 its not a required field.
How can I add this kind of rule. Thanks for your help in advance