Your contract is legal and enforceable. The parent commenter is just saying that there's no _automatic_ right to work you do in your free time (ie it has to be specifically mentioned in the contract). You could try and negotiate that clause out of your contract though.