Umar bin Khattab reported,

He had vowed during the days of ignorance to spend a night in spiritual retreat, so he asked the Messenger of Allah ﷺ about it, and he instructed him to fulfill the retreat.

Nasai 3851

Sahih

أخبرنا إسحق بن موسى قال حدثنا سفيان عن أيوب عن نافع عن ابن عمر

عن عمر

أنه كان عليه ليلة نذر في الجاهلية يعتكفها فسأل رسول الله ﷺ فأمره أن يعتكف

النسائي 3851صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
If he made a vow then accepted Islam before fulfilling it
Numbering
Darussalam 3851
Nasai 3851