If an adult is baptized only to please his parents because they were being pushy about it, is that baptism valid?
For the baptism of someone who has the use of reason, its validity depends upon the will of the recipient. If the recipient does not know he’s being baptized or does not want to be baptized, then his free will would cause the sacrament to be invalid.
If, however, the recipient is not opposed to the sacrament and reluctantly agrees to be baptized, then the baptism would be valid. The recipient’s free will would most likely be unwilling to make use of the graces imparted by the sacrament, but it would be valid nonetheless.