Frowned upon maybe, but legally enforceable as you are deemed to have entered a contract and therefore contract law will likely prevail. That's come from BALPA's legal people as well as my own after looking into this a few years ago.
Get your own advice is my shout but beware, this is a small industry and a good dispute resolution lawyer will fleece you for £7k before you can say 'Bond' should you choose to fight it.
As for the tax, I'm not sure you'll be able to offset it against your personal liability but if you're unsure it's worth a quick call to HMRC. They're pretty good these days!
All the best