I don't think you can control whether or not they have an affair. I DID ultimately decide, after about 60 days of this, that I COULD control whether or not she sat there and lied to my face, and to our family. And so I made THAT my hard boundary.
I even used the "we've always taught our kids that we don't lie in our family. Even if our marriage ends, we're still going to have to co-parent effectively, and I'm not going to try to raise a family with you built on a foundation of deceit. You need to tell them the truth about your affair" card.