Question
If there is a difference between the beliefs of the followers (muqtadis) and the imam, is the prayer valid?
Answer
The question does not clarify the nature of the belief, so the answer can be divided into two types:
Fundamental difference (the difference between disbelief and Islam)
If the difference between the beliefs of the imam and the followers is of a kind that lies between disbelief and Islam, that is, if either the imam or the followers have deviated from the fundamental beliefs of Islam, then in such a case the prayer will not be valid.
Secondary difference (difference in matters of fiqh)
If the difference is in matters of fiqh, such as the difference of being a follower of the Hanafi, Shafi’i, Maliki or any other school of fiqh, then this type of difference does not affect the prayer, and the prayer is valid.