فَإِنْ خَطَبَ قَاعِدًا، أَوْ عَلَى غَيْرِ طَهَارَةٍ: جَازَ، وَيُكْرَهُ.
Translation: If the imam delivers the sermon sitting or without ritual purity, it counts, but is disliked.
Validity and reprehensibility are distinct. Standing and purity are expected, but their omission does not necessarily invalidate the sermon according to the ruling stated here.