Not everything you shouldn't do is outlined in the Bible or the Catechism . . . or, for that matter, in Canon law, which also governs what Catholics may and may not do. We're not Fundamentalists in the sense that everything we believe must be written down to be justified.
Canon law does say that it is forbidden to officially witness an invalid marriage (that would be the best man or maid of honor), but I cannot now find the [exact] reference. The principle that in general you should not attend the wedding of an invalid marriage flows from general moral principles and not from positive law. (Because the marriage is not valid, and the purpose of attending a wedding is to bear witness to the marriage and to celebrate the marriage.) It is contradictory to attend a wedding that you know is invalid because you're bearing false witness to it. You are attesting that it is a marriage when in fact it is not a marriage and you are encouraging the two parties in their sin.
But, in general, this is a judgment call. There may be some circumstances under which the lesser evil is to go to the marriage. (For example, if it is the marriage of a son or daughter and not going would so disrupt your relationship with others that it would prove to be an impediment to the faith of the parties getting married.)
As in many things, the issue is not black and white, and your conscience must be your guide.