Masruq and Amr bin Utba reported,

They both wrote to Subayah bint Harith asking her about her situation, and she wrote back to them. At the end of her letter she mentioned that the Messenger of Allah ﷺ had said, "If you find a righteous husband, then marry."

Azami 6222

Sahih

عن مسروق وعمرو بن عتبة

أنهما كتبا إلى سبيعة بنت الحارث يسألانها عن أمرها، فكتبت لهما. وفي آخره أن رسول الله ﷺ قال: إن وجدت زوجا صالحا فتزوجي.

الأعظمي 6222صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Marriage and its conditions
Section
Encouragement to choose a righteous husband whether he has wealth or not
Numbering
Jami al-Kamil 6222 (2nd edition)
Azami 6222