It is narrated from Asma bint Abi Bakr (may Allah be pleased with her), she states: I asked the Prophet (ﷺ) about menstrual blood that gets on a garment. He (ﷺ) said: "Scrape it off, then rub it with water, then wash it with water, and then pray in it."
Hadith Referenceمسند الإمام الشافعي / كتاب الطهارة / 28
Hadith Takhrijأخرجه مسلم: الطهارة، باب نجاسة الدم وكيفية غسله (291).