وَعَنِ ابْنِ عُمَرَ: أَنَّ عُمَرَ سَأَلَ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: " كُنْتُ نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِد الْحَرَام؟ قَالَ: «فأوف بِنَذْرِك»

Ibn ‘Umar said that when ‘Umar consulted the Prophet about a vow he had made in the pre-Islamic period to spend a night in devotion in the sacred mosque, he said, “Fulfill your vow.”

(Bukhari and Muslim.)