From: https://stackoverflow.com/a/19546185/1477051
jQuery Validate actually directly supports this, using dependency
expressions.
All you need to do is change your validate options like this:
$('#myform').validate({
rules: {
fieldA: {
required:'#checkA:checked'
}
}
});
That's it!
I've used it on your code here: http://jsfiddle.net/xJBX9/1/