In law, marriage is considered a civil contract, to which the consent of the parties capable of contracting is essential.