$('#webForm').validate({
rules : {
chos: {
required : true,
},
},
messages : {
chos: "Please select radio button" ,
},
});
});
<input type="radio" name="chos" value="开发者_如何学JAVAphone"/>
<input type="radio" name="chos" value="email"/>
The above code is not working. I need radio buttton validation for the above code.
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"
}
});
精彩评论