Al-jawab billahi at-taufeeq (the answer with Allah’s guidance)
Below are some points where taking an oath by the Quran becomes valid and invalid:
1) If one was to raise the Quran in ones hand without actually taking an oath, then this would not be considered to be a valid oath.
2) If one lifted the Quran in ones hand or placed the hands on the Quran and then took an oath by it, then in such a case, some scholars are of the view that, it will not be a valid oath. However, many scholars even considered this to be an oath. Thus, an oath will be valid in this case also.
3) If one took an oath by the Quran, then this will be a valid oath.
4) If one took an oath by the Speech of Allah Ta’ala (KalamAllah), then this will be a valid oath. If broken, an expiation will be necessary.
(Raddul Muhtar Vol.3 Pg.53, Ahsanul Fataawa Vol.5 Pg.488)
The oath of somebody joking, enforced to take an oath, and mistaken will be effective according to the Hanafi Madhhab. Though, Shafiis and Hanbalis mention that it is ineffective, thus, no atonement (Kaffarah) is due.
(Al Fiqhul Islami Vol.3 Pg.467)
The expiation of oaths:
1. Freeing a slave
2. Clothing ten poor people, giving each of them one garment or more.
3. Feeding ten poor people two meals each.
4. When incapable of observing the above one can resort to fasting three days continuously.
Allah Ta’ala says,
“Allah will not punish you for what is uninentional in your oaths, but He will punish you for your deliberate oaths; for its expiation (a deliberate oath) feed ten Masakin (poor persons), on a scale of the average of that with which you feed your own families; or clothe them; or manumit a slave. But whosoever cannot afford (that), then he should fast for three days.That is the expiation for the oaths when you have sworn. And protect your oaths (i.e.do not swear much). Thus Allah make clear to you His Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) that you may be grateful..” (5:89)
And Only Allah Ta’ala Knows Best.
Moulana Qamruz Zaman