Allah, the Blessed and Exalted, says: "And purify your garments." [Surah al-Muddaththir: 4]
Imam al-Shafi'i (may Allah have mercy on him) said: "One view is that it means: pray in pure garments; and other views besides this have also been stated, but the first view seems the most correct, because the Messenger of Allah (peace and blessings be upon him) ordered that menstrual blood be washed from the garment."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / Q4083