Dear JohnRoss,
A sacrament is valid when the minister of that sacrament has the intent to do what the Church DOES in the sacrament, not the intent to do what the Church BELIEVES.
That's why even an atheist may validly baptize. It is unlikely that the atheist will intend to wash away Original Sin and give the soul life through the grace of God, not believing in God & all. However, if he intends to do what the Church DOES, that is, to baptize in the name of the Trinity and with water, then the sacrament is valid.
I'm not sure that the practice of your pastor is correct, but knowing next to nothing about the circumstances, I won't venture more.
sitetest
From the perspective of the Eastern Church; the Latin Church errs in its teaching that a non-Christian may baptise validly.
Scholastic theology says the intent is a key portion of sacramental validity. That is why Pope Leo XIII declared Anglican Orders were "utterly null and void."
Many Eastern canonists say Holy Orders is a necessity for sacramental validity; however, a lay Christian may baptise validly in extreme circumstances. Usually, in saner times a priest would conditionally baptise the person who has received an extraordinary baptism to ensure the validity.
Many Evangelicals baptise in the name of Jesus only. I doubt that would be considered valid by any except the most liberal Catholic "theologian."