Dalil

Quran Al-Ma'idah 5:43

وَكَيۡفَ يُحَكِّمُونَكَ وَعِندَهُمُ ٱلتَّوۡرَىٰةُ فِيهَا حُكۡمُ ٱللَّهِ ثُمَّ يَتَوَلَّوۡنَ مِنۢ بَعۡدِ ذَٰلِكَۚ وَمَآ أُوْلَٰٓئِكَ بِٱلۡمُؤۡمِنِينَ

Translation

But how is it that they come to you for judgement while they have the Torah, in which is the judgement of Allāh? Then they turn away, [even] after that; but those are not [in fact] believers.