 In order for that to be valid, they have to get married in the Catholic Church in the presence of a bishop, priest, or deacon who will witness and solemnize their union by blessing the marriage or as a representative of the church. Two simple things. Now, in this case, they don't believe anymore. They're drifting or they're running far away from the church, whatever the actual situation may be.