The Messenger of Allah ﷺ delivered a sermon to us on the day of sacrifice after the prayer. He said: If anyone prays like our prayer, and sacrifices like our sacrifice, his sacrifice is all right. If anyone sacrifices before the prayer (for 'Id), that is goat meant for flesh. Abu Burdah b. Niyar stood up and said: Messenger of Allah, I swear by Allah, I sacrificed before I went for prayer. I thought it was the day of eating and drinking; so I made haste, and ate myself, and supplied flesh to my family and neighbors. The Messenger of Allah ﷺ said: That is a goat meant for eating flesh. He said: I have a kid (of less than a year) which is better than two goats meant for flesh. Will it be valid from me ? He said: Yes, but it will not be valid for anyone after you. (Using translation from Abū Dāʾūd 2800)
خَطَبَنَا رَسُولُ اللهِ ﷺ يَوْمَ النَّحْرِ بَعْدَ الصَّلَاةِ ثُمَّ قَالَ «مَنْ صَلَّى صَلَاتَنَا وَنَسَكَ نُسُكَنَا فَقَدْ أَصَابَ النُّسُكَ وَمَنْ نَسَكَ قَبْلَ الصَّلَاةِ فَتِلْكَ شَاةُ لَحْمٍ» فَقَالَ أَبُو بُرْدَةَ يَا رَسُولَ اللهِ وَاللهِ لَقَدْ نَسَكْتُ قَبْلَ أَنْ أَخْرُجَ إِلَى الصَّلَاةِ وَعَرَفْتُ أَنَّ الْيَوْمَ يَوْمُ أَكْلٍ وَشُرْبٍ فَتَعَجَّلْتُ فَأَكَلْتُ وَأَطْعَمْتُ أَهْلِي وَجِيرَانِي فَقَالَ رَسُولُ اللهِ ﷺ «تِلْكَ شَاةُ لَحْمٍ» قَالَ فَإِنَّ عِنْدِي عَنَاقًا جَذَعَةً خَيْرٌ مِنْ شَاتَيْ لَحْمٍ فَهَلْ تُجْزِئُ عَنِّي؟ قَالَ «نَعَمْ وَلَنْ تُجْزِئَ عَنْ أَحَدٍ بَعْدَكَ»