Can. 1026 A person must possess due freedom in order to be ordained. It is absolutely forbidden to force anyone in any way or for any reason to receive orders or to deter one who is canonically suitable from receiving them.
…
Can. 1031 §1. The presbyterate is not to be conferred except on those who have completed the twenty-fifth year of age and possess sufficient maturity; an interval of at least six months is to be observed between the diaconate and the presbyterate. Those destined to the presbyterate are to be admitted to the order of deacon only after completing the twenty-third year of age.
…
Can. 1034 §1. A person aspiring to the diaconate or presbyterate is not to be ordained unless he has first been enrolled among the candidates through the liturgical rite of admission by the authority mentioned in cann.
⇒ 1016 and
⇒ 1019; his petition is previously to have been written in his own hand, signed, and accepted in writing by the same authority.
§2. A person who has been received into a clerical institute through vows is not bound to obtain this admission.
…
Can. 1036 In order to be promoted to the order of diaconate or of presbyterate, the candidate is to present to his bishop or competent major superior a declaration written in his own hand and signed in which he attests that he will receive the sacred order of his own accord and freely and will devote himself perpetually to the ecclesiastical ministry and at the same time asks to be admitted to the order to be received.
Can. 1037 An unmarried candidate for the permanent diaconate and a candidate for the presbyterate are not to be admitted to the order of diaconate unless they have assumed the obligation of celibacy in the prescribed rite publicly before God and the Church or have made perpetual vows in a religious institute.
…
Can. 1039 All candidates for any order are to make a spiritual retreat for at least five days in a place and manner determined by the ordinary. Before the bishop proceeds to ordination, he must be certain that the candidates properly made this retreat.