Wedlock, Marriage (Nikaah)
Ṣaḥīḥ al-Bukhārī 5070
الْعَمَلُ بِالنِّيَّةِ، وَإِنَّمَا لاِمْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ صلى الله عليه وسلم وَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَنْكِحُهَا، فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ
al-ʿamalu bi-an-niyyah, wa-innamā limriʾin mā nawā, faman kānat hijratuhu ilā-Llāh warasūlihi fahijratuhu ilā-Llāh warasūlihi ṣlā-Llāh ʿlyh wslm waman kānat hijratuhu ilā dunyā yuṣībuhā awi āmraʾatin yankiḥuhā, fahijratuhu ilā mā hājara ilayhi
Transliteration generated from the Arabic vowel marks
The full narration
Narrated `Umar bin Al-Khattab:The Prophet (ﷺ) said, "The rewards (of deeds) are according to the intention, and everybody will get the reward for what he has intended. So whoever emigrated for Allah's and His Apostle's sake, his emigration was for Allah and His Apostle; and whoever emigrated for worldly benefits, or to marry a woman, then his emigration was for the thing for what he emigrated for
Source
Ṣaḥīḥ al-Bukhārī · 5070