Yes. However, the priest should not have taken the liberty to add the words "so that you might be a faithful and happy Catholic." He should have simply said, "I absolve you from your sins, in the name of the Father, and of the Son, and of the Holy Spirit."
The Church teaches that
The form of the sacrament of penance, in which its efficacy chiefly consists, are those words of the minister: I absolve thee, etc., to which are indeed laudably added certain prayers according to the custom of holy Church, which, however, do not by any means belong to the essence of the form nor are they necessary for the administration of the sacrament. . . (Council of Trent, Fourteenth Session, Chapter III)