Ruling 68
If after performing prayers (ṣalāh) one doubts whether or not he had purified the anus or urinary outlet before performing prayers, the prayers that he performed are valid but he must purify the anus or urinary outlet for the next prayer.
-Ayatullah Sistani, Practical Laws of Islam, Purification (Taharah)


