The Messenger of Allah ﷺ said, "Fruit is not to be sold until it is fit to eat."
قال رسول الله ﷺ: لا يباع الثمر حتى يطعم.
No references are available.
Ahmad (2247) narrated it, as did Tabarani in Al-Kabir (1187, 1188), and Ibn Hibban graded it sahih (4988), all of them through the route of Amr bin Dinar, from Tawus, from Ibn Abbas, who related it as mentioned.As for Hakim (372), he narrated it through the route of Simak bin Harb, from Ikrima, from Ibn Abbas, and graded it sahih. But it contains Simak bin Harb, who is unreliable in his narration from Ikrima, so it would have been more fitting to cite the first route.