I have a problem with Jquery validator plugin. If user checks a radio button, I have to apply three validations for a text field. one its mandatory, two it is numeric and three its min length shud be 5. I am using some thing as following, but its not working. If radio is checked, mandatory validation is applied, and if radio is not checked other validations are applied. I want to apply all validations only if radio is checked. If radio is not checked no validations shud be applied.
rules: {
'myTextField' : {
"required":"#myRadio:checked",
"minlength":5,
"number": true
}
}