Sources
Council of Trent, session 7 (3 March 1547), canons on baptism, canon 4
«Si quis dixerit, baptismum, qui etiam datur ab haereticis in nomine Patris et Filii et Spiritus Sancti, cum intentione faciendi quod facit Ecclesia, non esse verum baptismum: anathema sit.» “If anyone says that the baptism which is given even by heretics in the name of the Father and of the Son and of the Holy Spirit, with the intention of doing what the Church does, is not true baptism, let him be anathema.”
Denzinger-Hünermann 1617 (Latin-Italian ed. of 1996, seen in the scan). Our translation.