Definitely enforceable without a doubt - and many industries have it as part of a standard employment contract, e.g Aircraft pilot.
Also as part of fairwork legislation to prevent being fired as a result of extended sick leave it actually requires disclosure of the condition.