(Imām Bukhārī narrates): Abu Al-Walid narrated to us, he said: Za'idah narrated to us, he said: Abu Husain narrated to us, from Abu Abdur Rahman, from Hazrat Ali (may Allāh be pleased with him), he said:
I was a man who experienced madhi frequently. I commanded a man to ask the Prophet ﷺ about it, because of his daughter (I did not ask myself). So he asked, and he said: Perform wudu, and wash your private part.
حَدَّثَنَا أَبُو الْوَلِيدِ، قَالَ حَدَّثَنَا زَائِدَةُ، عَنْ أَبِي حَصِينٍ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ، عَنْ عَلِيٍّ
قَالَ كُنْتُ رَجُلاً مَذَّاءً فَأَمَرْتُ رَجُلاً أَنْ يَسْأَلَ النَّبِيَّ صلى الله عليه وسلم لِمَكَانِ ابْنَتِهِ فَسَأَلَ فَقَالَ " تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ "
Reference: Sahih Al Bukhari 269