17 Since, however, We have spoken fully elsewhere on the Christian education of youth, let Us sum it all up by quoting once more the words of St. Augustine: "As regards the offspring it is provided that they should be begotten lovingly and educated religiously," - and this is also expressed succinctly in the Code of Canon Law - "The primary end of marriage is the procreation and the education of children."
Source: Casti Connubii (Vatican.va)