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