The Messenger of Allah ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to mourn for a deceased person for more than three days, except for a husband."
قال قرأت على عبد الرحمن بن مهدي مالك عن نافع عن صفية بنت أبي عبيد
أن رسول الله ﷺ قال لا يحل لامرأة تؤمن بالله واليوم الآخر أن تحد على ميت فوق ثلاث إلا على زوج
Its isnad is sahih, and it is like the one before it as well.