[validation] Is it possible to have dynamic rules

[validation] Is it possible to have dynamic rules

I have a series of fields and if one of them is filled out I want to make the rest of them required. So I made a function that checks all the fields and returns true or false.  I tried to put that function in my required rule like this:
  1. rules: {
  2.       MyField: {
  3.             required: function(element) {
  4.                   MyTestFunction();
  5.             }
  6.       }
  7. }
This worked fine, but if all the fields were cleared it doesn't turn the required off like I want it to. 

Any suggestions on how to make this work?