Hi,
You cannot. The purpose of contract constraint is mainly for input consistency (input length, string format...etc.). If you need to have business rule validation based on data or parameters, you can do this check in the task operations and redirect the BPMN flow accordingly.
HTH
Romain