Jeroen,
I've solved this issue using the disableValidators property of a field. It allows you to disable the validators attached to a field, based on a (runtime) condition.
Sample:
<xp:this.validators>
<xp:validateRequired
message="This field is only required if another condition is met.">
</xp:validateRequired>
</xp:this.validators>
<xp:this.disableValidators><![CDATA[#{javascript://disable validators based on some condition
if ( currentDocument.getItemValueString("fieldIsRequired") == "1") {
return false;
} else if (getComponent("fieldIsRequiredComponentId").getValue() == "1") {
return false;
} else {
return true;
};
}]]></xp:this.disableValidators>