Assalamualaikum w.b.t. Is a solemnization valid if the groom is in the state of janabah (major hadas – due to sexual intercourse or seminal discharge) when it was taking place?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
Nikah (solemnization) according to the 4th Edition of Kamus Dewan means an akad (agreement) that contains the utterances of ijab and qabul that permits a man and woman to have intercourse. 
The word nikah is mentioned in the statement of Allah SWT:
فَانْكِحُوا مَا طَابَ لَكُمْ مِنَ النِّسَاءِ
“Then marry those that please you of [other] women,” 
Islam encourages its ummah to get married for it is included as an action that is a part of the sunnah of the Prophet PBUH. Furthermore, marriage has many other advantages and benefits whether for an individual or even society. This is stated in a hadith narrated from Abu Ayyub RA, the Prophet PBUH said:
أَرْبَعٌ مِنْ سُنَنِ الْمُرْسَلِينَ: الْحَيَاءُ، وَالتَّعَطُّرُ، وَالسِّوَاكُ، وَالنِّكَاحُ
“Four matters that are among the sunnah of the messengers are shame, wearing perfumes, brushing teeth and marriage,” 
In fulfilling the commandments of a marriage, a person cannot run from fulfilling the commandments of syarak which is for the marriage to be complete and perfect. Thus, it is obligatory for a person who wants to get married to fulfil the requisites and conditions of marriage in order for it to be valid. Dr Muhammad Zuhaili stated that a complete solemnization will only be fulfilled when all of its requisites and conditions are fulfilled. 
The author of al-Fiqh al-Manhaji  stated that there are five requisites for the solemnization of a marriage and they are:
- Two witnesses
Syeikh al-Baijuri said: “What is stated by the author (author of the commentary on Matan Abi Syuja’) is for a wali and two witnesses. The remaining requisites are the husband, wife and sighah. All of the requisites mentioned are a total of 5 as mentioned.” 
Jurists when discussing the husband, there are several conditions that should be considered in order for the marriage to be valid. The author of Al-Fiqh Al-Manhaji stated the conditions are as follows:
- He is a non-mahram for the bride.
- A groom is a person that has been determined.
- The groom is not in the state of ihram for hajj or umrah. This is based on the hadith:
لاَ يَنْكِحُ الْمُحْرِمُ وَلاَ يُنْكَحُ وَلاَ يَخْطُبُ
“One who is on pilgrimage may not marry, or give someone in marriage, or make a betrothal.” 
According to the above question, in our opinion, for a solemnization that is done in the situation where the groom has yet to perform the obligatory bath or in other words is in the state of junub, his marriage is valid. The reason is that an obligatory bath is not included as a valid condition in marriage. Although we advise that if one is in the state of junub, it is better to avoid entering a mosque. This is in accordance with a hadith of the Prophet PBUH:
إِنَّ الْمَسْجِدَ لاَ يَحِلُّ لِجُنُبٍ وَلاَ لِحَائِضٍ
“The mosque is not permissible for anyone who is sexually impure or any woman who is menstruating.” 
However, this hadith is not excluded from scholars’ critics, but Imam al-Syaukani has discussed it in-depth and emphasized that this hadith becomes strong because it is supported by numerous supporting factors (syawahid). 
May Allah SWT grant us all understanding in this religion. Amin.
 Surah Al-Nisa’: 3
 Narrated by al-Tirmizi (1080) and Ahmad (23628)
 See al-Mu’tamad fi al-Fiqh a-Syafi’e, 4/53
 See al-Fiqh al-Manhaji, 4/55
 See Hasyiah al-Baijuri ‘ala syarh Ibn al-Qasim ‘ala matn Abi Syuja’, 2/188
 Narrated by Muslim (3512)
 Narrated by Abu Dawud (232) and Ibnu Majah (645)
 See Nail al-Authar, 1/288