despegue - I am not a lawyer but I would agree that if a contract is illegal in the first place you cannot be held to comply it whether in the EU or UK. What do you believe makes the contract under discussion illegal, have you seen the contract yourself? And if you have what part do you suggest differs under EU law and UK law?
PS there are many on here who wish desparately to leave the EU and all your rules so please don't throw that at us in this discussion you will just get peoples backs up. We are where we are at the moment.
I am on the side of those who believe if you sign a contract you are honourably bound to comply with it and work you notice and pay your bond or come to some amicable agreement to pay it off. You do not leave owing the company anything; if you do anticipate the consequences. Perhaps some believe that this contract is unreasonable and therefore in some way illegal, if so perhaps you could explain?