In the first part of Ayah 264 of Surah Al-Baqarah, Allah (SWT) warns the believers by saying:
“O’ you, who believe do not invalidate your charitable deeds with reminders and hurtful words, like the one who spends his wealth only to be seen by people; not believing in God and the last day.” The holy Quran informed the believers about this particular conspiracy of Satan. Also Imam Sadeq (AS) narrated from the Prophet of Islam (PBUH) who said: Any person who carries out a good deed for a believer, and then bothers the believer verbally or make them feel obligated, Allah (SWT) will invalidate his/her Sadaqah [1].
[1] Wasa’elul Shia, Vol. 9, Page 454.
Source: en.shafaqna.com