RESPONSE: A marriage is valid when both parties have expressed their free consent to be married through the exchange of vows, even though they have not consummated their union. However, a marriage that has not been consummated may be dissolved by the Church. Regarding the marriage of Joseph and Mary, their complete commitment to doing the will of God made the dissolution of their marriage a non-issue in their case. As Pope John Paul II has written, “In the course of that pilgrimage of faith which was his life, Joseph, like Mary, remained faithful to God’s call until the end."
DISCUSSION: For a marriage to be valid, two persons must enter into the covenant with free and mutual consent: They must enter into the marriage covenant while “not being under constraint" and “not impeded by any natural or ecclesiastical law". The Church teaches that this free exchange of consent is the indispensable element necessary for a valid marriage (Catechism, no. 1625).
While it is not necessary for a marriage to be consummated in order to be valid, a marriage that has not been consummated by the spouses may be dissolved by the Church; either spouse of a non-consummated marriage may seek to have the marriage dissolved. However, a valid, consummated marriage “between baptized persons can never be dissolved" (Catechism, no. 1640).
Generally, the Church does not encourage persons to enter into marriage if they do not plan on consummating the union. The Church generally recommends that those who desire to live in a state of consecrated virginity enter a religious order or live alone.
What, then, of Mary and Joseph? First, contrary to the views of some, they were in fact married, not engaged, before the angel told Joseph to take Mary into his home. In Jewish law, to be “betrothed" meant they were already married, even though they were not yet living together. Betrothal, like today, conveyed consent and thus validated thier marriage, as Pope John Paul II notes:
Addressing Joseph through the words of the angel, God speaks to him as the husband of the Virgin of Nazareth. What took place in her through the power of the Holy Spirit also confirmed in a special way the marriage bond which already existed between Joseph and Mary. God’s messenger was clear in what he said to Joseph: “Do not fear to take Mary your wife into your home." Hence, what had taken place earlier, namely, Joseph’s marriage to Mary, happened in accord with God’s will and was meant to endure. In her divine motherhood Mary had to continue to live as “a virgin, the wife of her husband" (cf. Lk. 1:27)." 
The Pope anticipates the next issue:
Doing God’s will in their lives necessarily implied a marriage in which Mary would remain a virgin, a marriage of complete and holy continence for the Holy Family’s husband and wife. Their marriage is an exception in God"s divine plan, yet they are truly a model for all married couples: Mary the Immaculate Conception who always perfectly did God"s will, and Joseph is an exemplar of “complete self-sacrifice" by taking Mary into his home, “while respecting the fact that she belonged exclusively to God."