It is narrated, most likely as a marfu’ hadith, from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the prayer is invalidated if a dog or a menstruating woman passes in front of the one praying.
Hadith Referenceمسند احمد / ومن مسند بني هاشم / 3241