Naw, bro, your phrase "law of international relations" had me wondering if you were referencing IR realism, a core tenet of which is the inherent anarchy of the international system--and another core tenet of which is the centrality of state actors, which is why I would have found it particularly intriguing in this context. But I was wrong--not the case.
But, er, do you really think that law must never be violated in order for it to be binding?
No, I don't think violation of a law invalidates a law.
But note that there's a difference between respect for traffic laws in say, south Italy, and traffic laws here in the States. It's a matter of perceived enforcement. If you don't enforce a law, no one is going to feel obligated to follow it. If a good-faith effort is not made to actually enforce any law uniformly, it becomes perceived as nothing more than a tool for arbitrary and capricious enforcement in support of individual or political ends.
I believe that the only "teeth" of things like UNCLOS, UN Security Council resolutions, or any other legal or quasi-legal body which purports to dictate the behavior of a nation-state is ultimately armed force by another nation state. Mao was right. Political power flows from the barrel of a gun. Yet use of armed force is largely voluntary. We intervened in the Balkans. We didn't intervene in Darfur. Not saying one is right or wrong, and no, we can't intervene everywhere. But in an environment where nation-states cannot or will not uniformly enforce the rule of law, it does devolve into a
de facto if not a
de jure Hobbesian system.
This doesn't mean human rights don't exist, or that certain actions aren't illegal. China's nine-dashed line is blatantly illegal. Putin's invasion of Crimea is blatantly illegal. But no one stopped them, because there's no "world police," just nations with different interests. And if you can accumulate enough military and diplomatic power to make the rest of the world think twice about forcibly stopping you, a nation-state can basically wipe their collective ass with any treaty they've signed. If they deem it in their interests and don't have a government which respects the rule of law.