I'm not the same person I was 10 years ago, but I had the same values and understood the importance of communication in a relationship that I do today. And I looked for a partner that had the same values.
If you don't know the person you're with has those same values (values don't really change much after your 20s/early 30s from my experience) then DON'T GET MARRIED.
I won't even pretend that divorce could never happen for me (anything is possible) but if you don't see the warning signs well before (going back to the importance of communication in a relationship) and make the conscious decision to rectify the problem you're not doing marriage right.