model rules

I want to specify the following in my model:

that an attribute is required if another attribute is not set.

so if the person did not provide a value for attribute1 than attribute2 is required.

How can I do that using the model ruleS?

Use a validator method:

The authenticate() method on that page should give you an idea of how it works.

You can create own validations, or i saw 2 extensions with this functionality,