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.