He found madhiy on his clothes after he had offered several prayers
Question

I found traces of madhiy on my underwear after I had prayed Fajr, Zuhr and ‘Asr. I changed my underwear before praying Maghrib. Are the prayers that I offered invalid?.
Praise be to Allah.Firstly: 
Madhiy is a thin fluid that is usually emitted when desire is provoked. It is naajis and invalidates wudoo’, but its najaasah is light and in order to purify oneself it is sufficient to wash the private part and sprinkle water on one’s clothes. 
See the answer to question no. 2458. 
Secondly: 
Your prayers, Fajr, Zuhr and ‘Asr, are valid in sha Allah, and you do not have to repeat them. 
That is for two reasons: 
1. You are not certain when the madhiy was emitted, so there is the possibility that it was emitted after ‘Asr prayer. In the event of this uncertainty, the basic principle is that the prayers that were done previously are valid. The basic principle according to the scholars in this case is that if uncertainty arises after finishing an act of worship – was it valid or not? – no attention should be paid to this uncertainty and the Muslim should proceed on the basis of this principle, which is that an act of worship remains valid until one is certain that it has been invalidated. 
2. If a person prays in a state of impurity because he was unaware of its presence, or he was aware but then forgot, his prayer is valid according to the correct opinion. Al-Nawawi (may Allah have mercy on him) attributed this view to the majority of scholars, and favoured this view. Al-Majmoo’ (1/163). 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The words “or forgot it” mean that he forgot that the najaasah (impurity) had gotten onto him, and he did not remember it until after he had said the salaam. He has to repeat the prayer according to the author’s view, because he annulled one of the conditions of prayer, which is avoidance of impurity, so it is as if he prayed having broken his wudoo’ and having forgotten that he had done so. 
This is also like one who forgot to wash it off. 
The more correct view in all these cases is that he does not have to repeat it, whether he forgot it, or he forgot to wash it, or he was unaware that it had gotten onto him, or he was unaware that it was an impurity, or he was unaware of the ruling on it, or he was unaware that it happened before the prayer, or after the prayer. 
The evidence for that is the important general principle that Allah set out for His slaves, as in the verse (interpretation of the meaning): 
“Allah burdens not a person beyond his scope. He gets reward for that (good) which he has earned, and he is punished for that (evil) which he has earned. ‘Our Lord! Punish us not if we forget or fall into error…’” [Al-Baqarah 2:286]. 
This man who did this haraam thing was ignorant or forgetful, and Allah has relieved him of blame, so there is nothing left to be required of him. 
There is specific evidence concerning this issue, which is that when the Messenger of Allah (peace and blessings of Allah be upon him) prayed wearing shoes on which there was some dirt, and Jibreel told him about that, he did not interrupt his prayer and start over. As this did not invalidate the first part of his prayer, it did not invalidate the rest of the prayer either."(Al-Sharh al-Mumti’ 2/232). 
And Allah knows best.