Sunan Ibn Majah, Volume 5, Book 37, Hadith 4222 (DarusSalam)

It was narrated that Kulthum Al-Khuza’i said: “A man came to the Prophet and said: ‘O Messenger of Allah, how can I know, when I have done something good, that I have done well, and if I have done something bad, that I have done a bad deed?’ The Messenger of Allah said: ‘If your neighbors say that you have done something good, then you have done well, and if they say that you have done something bad, then you have done something bad.’”

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ جَامِعِ بْنِ شَدَّادٍ، عَنْ كُلْثُومٍ الْخُزَاعِيِّ، قَالَ أَتَى النَّبِيَّ ـ صلى الله عليه وسلم ـ رَجُلٌ فَقَالَ يَا رَسُولَ اللَّهِ كَيْفَ لِي أَنْ أَعْلَمَ إِذَا أَحْسَنْتُ أَنِّي قَدْ أَحْسَنْتُ وَإِذَا أَسَأْتُ أَنِّي قَدْ أَسَأْتُ فَقَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏ "‏ إِذَا قَالَ جِيرَانُكَ إِنَّكَ قَدْ أَحْسَنْتَ فَقَدْ أَحْسَنْتَ وَإِذَا قَالُوا إِنَّكَ قَدْ أَسَأْتَ فَقَدْ أَسَأْتَ ‏" ‏ ‏.‏

sunnah.com