there is nothing in canon law that requires a service project, retreat or any other specific action on the part of the candidate to make the sacrament of confirmation valid. It is the bishop (or his delegate) who confirms and it his proper use of matter and form that make the sacrament valid. What is required for those who have reached the age of reason (the minimum age in the western Church at this time) is that they be “properly prepared and worthily disposed” and that they ask for the sacrament. The bishop decides what “properly prepared” means. Worthily disposed means they have a basic understanding of what the sacrament does and who is the Holy Spirit, appropriate to their age, and that they are in the state of grace.
No DRE or catechist has the right to tell a candidate he may not receive the sacrament at this time. It may be delayed (never denied, delayed) only on the judgment of the pastor and he must inform the candidate (and parents) in writing of his decision. This is almost never done without an interview with the pastor & candidate, and the usual reason is the child simply does not want to be confirmed.
What happens to those hundreds of teens every year who go through the motions in a confirmation program, never take advantage of the opportunities for grace and spiritual growth which are offered to them by the diocese and parish as a gift–retreats, service opportunies, classes etc.? They receive the valid sacrament, but the graces and gifts of the Holy Spirit may not be as readily available until such time as they open themselves up to these occasions of grace. Because they have not done service for the church and God’s poor, they have not learned to see the face of Christ in those whom they serve, and they are impoverished because of this. Because they did not pay attention to the value of the gifts of the Holy Spirit, they don’t know to ask for those gifts when they are needed.
With someone who receives in a state of mortal sin (which will probably be the next question) the sacrament is valid, but the grace of Christ and gifts of the Holy Spirit are not available to them at all until they confess and are absolved.
It is the pastor who as part of the confirmation rite presents the candidates to the bishop and affirms that they are prepared and disposed for the sacrament. He has already asked the catechists and sponsors for their recommendations, but it is his right to tell a candidate who has provided no assurance that the sacrament may be delayed until he does.
the requirement for First Communion is also that the child be of the age set by the bishop, properly prepared and worthily disposed. That means they must receive catechesis suitable for their age, understand the nature of the sacrament, who Jesus is and what his sacrifice means for us, how that sacrifice is celebrated in Mass, the difference between ordinary bread and wine and the Eucharist, and that they want to receive Jesus, and that they make confession first. Retreats, parent meetings etc. or lack of them are not reasons to deny the sacrament to the child who ask for them, although again only the pastor can delay reception of the Eucharist if he has reason to doubt the child’s disposition. The validity of the Eucharist depends on the proper matter and form used by the presiding priest, not on the communicant.
Someone may receive a sacrament illicitly–say the Catholic school student who himself is not Christian, but mistakenly receives with all the others in his class, but that does not affect validity.