Question: The scholars of the madhhab said: The congregational prayer is not valid behind a sinner (fāsiq) or anyone who is considered as such. The sinner is well known, but we want a rule by which we can recognize one who is “in the same ruling as the sinner.” What is that?
Answer (and Allah is the Giver of success): Their discussion about defining who is in the same ruling as the sinner is not clear, but it should be the one who commits a sin that could be either minor or major. However, this does not completely align with their words, for according to them, every deliberate sin is a major one.
Perhaps what we have mentioned is what is meant by the higher class of al-mukhrijin (1), for even though this was not their formal view, they formulated the madhhab in a way that accommodates both those who say every deliberate sin is a major one and those who say otherwise. This is what has become clear to me — and Allah is the One who grants success.
(1)- Al-Mukhrijin; they are the ones who extracted from the statements of the Imams and their evidences by means of analogy (Qiyas) or implication (mafhum).
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.3