وقد جاء تأكيد هذا الأمر أو هذه الوسيلة في حديث في سنن أبي داود وغيره
This matter or this method has been emphasized in a hadith in Sunan Abī Dāwūd and others,
أن النبي صلى الله عليه وآله وسلم كان قد أرسل سرية للجهاد في سبيل الله،
that the Prophet ﷺ sent a expedition for making Jihād in the path of Allah.
فلما لقي المسلمون الكفار وقاتلوهم وأمسى بهم المساء وناموا
When the Muslims met the kuffār (disbelievers) and fought them, the evening set and they slept.
أصبح أحدهم قد احتلم وبه جراحات كثيرة في بدنه،
One of them woke up having had a wet dream (i.e. nocturnal emission) and he was suffering from many injuries in his body.
فسأل من كان حوله هل يجدون له رخصة في ألا يغتسل، فقالوا له: لابد لك من الاغتسال،
So, he asked those around him if they find a concession for him not to make ghusl (ritual bath). they said to him: "It is a must for you to do ghusl."
فاغتسل الرجل فمات، بسبب الجراحات التي كانت أصابته،
The man made ghusl and died, because of the injuries that he was afflicted with.
فلما بلغ خبرُه رسول الله صلى الله عليه وآله وسلم دعا على أولئك الذين أفتوه بالاغتسال فقال: ( قتلوه قاتلهم الله، ألا سألوا حين جَهِلوا، فإنما شفاء العَيِّ السؤال ).
When this news reached the Messenger of Allah ﷺ he made du'ā against those who gave the ruling for him to make ghusl and said: "They killed him may Allah kill them, do they not ask when they are ignorant, indeed the cure for not knowing is asking"
الشاهد من هذا الحديث قوله عليه السلام: ( فإنما شفاء العَيِّ السؤال ) أي شفاء الجهل السؤال.
The important point from this hadīth is his ﷺ saying: "Indeed the cure for not knowing is asking" meaning – the cure for ignorance is asking.