Al-Kāfi - Volume 7 > The Intention for an Oath
Hadith #3

3- عَلِيُّ بْنُ إِبْرَاهِيمَ عَنْ أَبِيهِ عَنْ صَفْوَانَ بْنِ يَحْيَى قَالَ سَأَلْتُ أَبَا الْحَسَنِ (عَلَيْهِ السَّلام) عَنِ الرَّجُلِ يَحْلِفُ وَضَمِيرُهُ عَلَى غَيْرِ مَا حَلَفَ عَلَيْهِ قَالَ الْيَمِينُ عَلَى الضَّمِيرِ.

3. Ali ibn Ibrahim has narrated from his father from Safwan ibn Yahya who has narrated the following: “I once asked abu al-Hassan, ‘Alayhi al-Salam, about the case of a man who swears but his mind is on something other than that for which he has taken the oath. He (the Imam) said, ‘Swearing is for that which is in one’s mind.’”