Sayyiduna Ibn Abbas (may Allah be pleased with them both) (the narrator thinks this report is from him) said: "Whoever vows to slaughter himself or his child should slaughter a ram instead." Then he recited this verse: "Indeed, in the Messenger of Allah (peace and blessings be upon him) you have an excellent example." [Surah al-Ahzab: 21]
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11945