Whether the minister's intention is required for the validity of a sacrament?

Objections

Objection 1 : It seems that the minister's intention is not required for the validity of a sacrament. For the minister of a sacrament works instrumentally. But the perfection of an action does not depend on the intention of the instrument, but on that of the principal agent. Therefore the minister's intention is not necessary for the perfecting of a sacrament.
Objection 2 : Further, one man's intention cannot be known to another. Therefore if the minister's intention were required for the validity of a sacrament, he who approaches a sacrament could not know whether he has received the sacrament. Consequently he could have no certainty in regard to salvation; the more that some sacraments are necessary for salvation, as we shall state further on (Question [65], Article [4]).
Objection 3 : Further, a man's intention cannot bear on that to which he does not attend. But sometimes ministers of sacraments do not attend to what they say or do, through thinking of something else. Therefore in this respect the sacrament would be invalid through want of intention.