Muhammad bin Amr bin Ata reported,

I named my daughter Barrah, and Zaynab bint Abu Salama said to me, "The Messenger of Allah ﷺ forbade this name. I too was named Barrah, and the Messenger of Allah ﷺ said, 'Do not declare yourselves pure. Allah knows best who among you are the righteous.'"They asked, "What should we name her?"He replied, "Name her Zaynab."

Muslim 5609

Sahih

حدثنا عمرو الناقد حدثنا هاشم بن القاسم حدثنا الليث عن يزيد بن أبي حبيب

عن محمد بن عمرو بن عطاء قال

سميت ابنتي برة فقالت لي زينب بنت أبي سلمة إن رسول الله ﷺ نهى عن هذا الاسم وسميت برة فقال رسول الله ﷺ لا تزكوا أنفسكم الله أعلم بأهل البر منكم فقالوا بم نسميها قال سموها زينب

مسلم 5609صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Etiquette
Chapter
Recommendation to change an ugly name to a good one, and changing the name Barrah to Zaynab and Juwayriyah and the like
Numbering
Darussalam 5609
Muslim 5609