Ali said to Sharahah, "Perhaps you were forced. Perhaps your husband came to you. Perhaps, perhaps."She replied, "No."When she had given birth to what was in her womb, he flogged her and then stoned her. It was said to him, "You flogged her and then stoned her?"He answered, "I flogged her according to the Book of Allah, and I stoned her according to the Sunnah of the Messenger of Allah ﷺ."
حدثنا بهز حدثنا حماد بن سلمة أنبأنا سلمة بن كهيل
أن عليا رضي الله عنه قال لشراحة لعلك استكرهت لعل زوجك أتاك لعلك لعلك قالت لا قال فلما وضعت ما في بطنها جلدها ثم رجمها فقيل له جلدتها ثم رجمتها قال جلدتها بكتاب الله ورجمتها بسنة رسول الله ﷺ
Its isnad is sahih, and it is a longer version of 839. See also 1185.In H, "Mubarriz bin Hammad bin Salama" appears, which is an error we corrected from K and H.