Say someone purchased clothing on shabbat--knowing that it was a violation--can that clothing be worn?
Since you say the purchaser knows his act was "a violation", I'll assume he's Jewish. For the same reason, I won't discuss here a case in which someone did a prohibited act without knowing that what he was doing was wrong. (The rules are somewhat different in such a case.) Thus, caveat lector: the below is about cases in which the Shabas-violator knew he was violating Shabas.
If something is cooked by a Jew on Shabas the cooked food cannot be eaten on that Shabas, and is forbidden to him forever. (Shulchan Aruch 318:1.) The commentators note that the same is true for other prohibitions, not just cooking.
But Beur Halacha ("אחת משאר מלאכות", quoting Chaye Adam) says that if a forbidden act done on an object did not physically change the object in any way (e.g. something was carried), then it's prohibited only until the close of Shabas, even for the violator. He (still quoting Chaye Adam) adds that if the forbidden act, though it didn't physically change the object, was a divine prohibition then one should not allow himself that lessening of the restrictions, but should consider the object prohibited as per the general rule above.
But buying clothes on Shabas is usually not a divine prohibition. (It can be in some circumstances.) So in most cases, you would not be allowed to use the garment on Shabas, but it would be permitted afterward. Even if a divine prohibition were violated, the garment would be permitted to everyone but the violator.
This is a general discussion based on Shulchan Aruch and others. If the question is relevant to you, consult your rabbi.