1. Article 258 of the Criminal Law stipulates that whoever commits bigamy while having a spouse, or marries someone knowing that they have a spouse, shall be sentenced to fixed-term imprisonment of not more than two years or criminal detention.
2. Article 259 of the Criminal Law stipulates that anyone who knowingly cohabites or marries a soldier shall be sentenced to fixed-term imprisonment of not more than three years or criminal detention.
The above two kinds of criminal offences are aimed at serious "cheating" behavior. If you occasionally have unfair sexual relations with the opposite sex outside marriage, you can only rely on moral public opinion to condemn and put pressure on cheaters, but you can't pursue criminal responsibility.