More specifically, if the parents don’t truly have the intention of raising the child in the Church, does this have an effect on the validity of the sacrament?
What is required for a valid baptism is:
- proper matter = water
- proper intent of the minister = to do what the Church does
As long as water is used (and not soda or tea or such) and the individual truly intends to baptize (meaning its not, for example, a play) then the baptism is valid. The intention of the parents is required for the baptism to be licit (i.e. legal) but is not required for validity.