The Messenger of Allah ﷺ used to test the believing women who emigrated to him with this verse, the words of Allah, "Prophet, when believing women come to you pledging allegiance to you" through to His words "Forgiving and Merciful" [Mumtahinah 60:12].Urwa said that Ayesha said, "Whichever of the believing women accepted this condition, the Messenger of Allah ﷺ would say to her, 'I have accepted your pledge.' It was speech alone, and by Allah, his hand never touched the hand of any woman while taking the pledge. He took their pledge only with his words, 'I have accepted your pledge on that.'"
أن رسول الله ﷺ كان يمتحن من هاجر إليه من المؤمنات بهذه الآية بقول الله: {يأيها النبي إذا جاءك المؤمنت يبايعنك} إلى قوله {غفور رحيم} قال عروة: قالت عائشة: فمن أقر بهذا الشرط من المؤمنات قال لها رسول الله ﷺ: قد بايعتك كلاما، ولا والله ما مست يده يد امرأة قط في المبايعة ما يبايعهن إلا بقوله: قد بايعتك على ذلك.
Bukhari related it in the Tafsir (4891), and Muslim in the Emirate (1866: 88), both of them through Ibn Shihab, who said, Urwa bin Zubayr told me that Ayesha, the wife of the Prophet ﷺ, told him, and he narrated it, with the wording following Bukhari's version.