Thomas Aquinas,
Summa Theologiae — Question 64 - OF THE CAUSES OF THE SACRAMENTS…
“ It may happen that a man's faith is defective in regard to something else, and not in regard to the reality of the sacrament which he confers: for instance, he may believe that it is unlawful to swear in any case whatever, and yet he may believe that baptism is an efficient cause of salvation. And thus such unbelief does not hinder the intention of conferring the sacrament. ”
