Catholic not getting married in the church invalid?

If a Catholic does not get married in a Catholic church and not by a priest, is the marriage valid in the Catholic Church?

A Catholic is bound to be married in the Church (canons 1059, 1108 §1) or receive a dispensation to be married in another setting (canon 1127 §2). If neither takes place, then the marriage is invalid. This is true whether both parties are Catholic or only one is Catholic.

DISCLAIMER: The views and opinions expressed in these forums do not necessarily reflect those of Catholic Answers. For official apologetics resources please visit www.catholic.com.