It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Keep the fast pure (from sins), for fasting is not merely abstaining from food and drink; rather, fasting in reality is abstaining from sins. So when one of you is fasting and someone behaves ignorantly towards him or insults him, let him say: 'Inni sa'im' (Indeed, I am fasting)."
Abu Dawud al-Tayalisi narrated this through Talhah bin Amr, who is a weak narrator. The authors of the Six Books also recorded it, but they did not mention the opening part of the hadith up to his words "but fasting is abstaining from sins." Ibn Khuzaymah in his Sahih, and Ibn Hibban and al-Hakim, recorded it and graded it sahih with the following wording: "Fasting is not merely abstaining from eating and drinking; rather, fasting is abstaining from idle talk and obscenity. So if someone insults you or behaves ignorantly towards you, say: 'Inni sa'im, inni sa'im' (I am fasting, I am fasting)."