Sahih al-Bukhari 5561
Ali bin Abdullah (Madini) narrated to us that Isma'il bin Ibrahim told us. He narrated from Ayyub, Ayyub from Muhammad (bin Sirin), he from Hazrat Anas (ra), Hazrat Anas (ra) narrating from the Prophet (saw). He (saw) said: “Whoever slaughtered before the Prayer (Salat) should do it again.” On hearing this a man said: This is a day on which meat is desired. He mentioned the need of his neighbour, and on hearing this the Prophet (saw) regarded him as excused. (And he said:) I have a one-year-old kid which is better than two goats? The Prophet (saw) gave him permission. I do not know whether this permission applied (to others) or not. Then he came back and took two rams, that is, slaughtered them, and the people too went to the flocks of goats and slaughtered them.
AI-translated by Islam-Today
Book 12: Whoever slaughters his sacrifice before the 'Eid prayer should repeat it