There is a fundamental question to be addressed with your contention, Gromit.
In my view, in the UK “validly passed legislation” is that which goes through the due process of both Houses of Parliament and subsequently receives the Sovereign’s assent. Such legislation should not be deemed “illegal” by any UK court and certainly not by any body outside the UK. The fact that some people may not like the legislation or that individual aspects of it impact upon some people to a greater degree than others is immaterial. In short, Parliament should be sovereign.
Only since the growth of Human Rights legislation has the ability to challenge laws on the basis of “non-compatibility” been possible. It is outrageous, it destroys the sovereignty of Parliament and makes the UK (and indeed most of Europe who subscribe to such nonsense) a laughing stock.