Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.098.

Section : Smiling or laughing during the salah.

Ibn al-Munzhir records that there is a consensus of opinion that laughing (during the salah) invalidates the prayer. An-Nawawi says: “This is the case if one laughs aloud, and produces sound. Most of the scholars say that there is no problem with smiling. If one is overcome by laughter and cannot control it, his salah will not become invalid if it is of minor nature. If it is a hearty laughter, it will invalidate the salah. Custom would determine whether it is a major or a minor laughter.”