Abdullah bin Umar reported,

A woman was found killed in one of the battles of the Prophet ﷺ, and the Messenger of Allah ﷺ condemned the killing of women and children.In another wording, the Messenger of Allah ﷺ forbade the killing of women and children.

Azami 7900

Sahih

عن ابن عمر

أن امرأة وجدت في بعض مغازي النبي ﷺ مقتولة، فأنكر رسول الله ﷺ قتل النساء والصبيان. وفي لفظ: فنهى رسول الله ﷺ عن قتل النساء والصبيان.

الأعظمي 7900صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Prohibition of killing children and women in war
Numbering
Jami al-Kamil 7900 (2nd edition)
Azami 7900